Javascript examples for String:substring
Find substring using starting and ending word in a string and substrings indexes in javascript
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {// www .ja v a 2 s . co m function extractText(strToParse, strStart, strFinish){ return strToParse.match(strStart + "(.*?)" + strFinish)[1]; } console.log(extractText("first second third", "first", "third")); }); </script> </head> <body> </body> </html>