Javascript examples for jQuery:Array
Use RegExp to find all occurences of a a quoted word in an array
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> </head> <body> <script type="text/javascript"> var testsentence = 'This "is" a wonderful "sentence" to "test" "stuff"'; console.log(testsentence.match(/"[^"]+"/g)); </script> </body>/*from w w w . j av a 2 s. c o m*/ </html>