<script type="text/javascript"> var str = "abc"; var patt1 = /^[a-z]$/; if(patt1.test(str)) { document.write(str); alert(str); } </script> i want to make regular expression for string if it match then alert what problem in this code?
^[a-z]*$
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)