<script type="text/javascript"> var str = "abc"; var patt1 = /^[a-z]$/; if(patt1.test(str)) { document.write(str); alert(str); } </script>
<script type="text/javascript"> var str = "abc"; var patt1 = /^[a-z]$/; if(str.search(pat1) != -1) { document.write(str); alert(str); } </script>
var str = "abc"; var patt1 = /[a-z]/i; //Tests if the given string matches the Regexp, and returns true if matching, false if not. if(patt1.test(str)) { document.write(str); alert(str); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)