Previous Example-|-Next Example-|-Return to Chapter Listing
Example 14.14:
Regular Expressions - Using the match() Method
[This example works with Netscape Navigator 4. It won't work with Netscape Navigator 2 or 3, or Internet Explorer 3.]
Type some text into the form--anything you want. Then click the button and the script will search for the characters is. If they're found, you'll see the characters is in the box Results text box. If you didn't type is in your text string, you'll see null (meaning it didn't find what you're looking for).
Here's the function that uses the match() method:
Here's the form:
Previous Example-|-Next Example-|-Return to Chapter Listing