Coding Knowledge Center
JavaScript
RegExp (match) |
var patt1=new RegExp("e");
document.write(patt1.test("The best things in life are free"));
Matches the "e" in the "The best things in life are free". Returns true or false to indicate whether or not there was a match.
Script tags |
<head>
<script type="text/javascript">
<!--
[Code Goes Here]
-->
</script>
</head>
JavaScript Block