Previous Example-|-Next Chapter's Examples-|-Return to Chapter Listing
Example 14.20:
More Regular Expression Examples
[This example works with Netscape Navigator 4. It won't work with Netscape Navigator 2 or 3, or Internet Explorer 3.]
Play around with these forms to see how regular expressions work. (Note that at the time of writing the i and g modifiers do not work correctly, but should be working in the released version of Navigator 4.) Rather than putting all the functions in the HEAD, we've grouped each function with the form with which it works. To see a reference table with the different special characters and modifiers, click here.
The match() method
The replace() method
The split() method
Phone number extractor using match()
Phone number extractor using split()
Here are the scripts and forms:
The match() method
The replace() method
The split() method
Phone number extractor using match()
Phone number extractor using split()
Previous Example-|-Next Chapter's Examples-|-Return to Chapter Listing