Javascript examples for RegExp:RegExp test
Determine if a string is contained within another string
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/*from w w w. j av a2s. c o m*/ var htmlstr = '<b class="fl_r">Example</b>'; var reg = /<b class="fl_r">Example<\/b>/.test(htmlstr); console.log(reg) }); </script> </head> <body> </body> </html>