Previous Example-|-Next Example-|-Return to Chapter Listing
Example 14.16:
Regular Expressions - Using replace() More Accurately
[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. Then click the button and the script will search for the characters is ; this time, though, it also searches for a space before and after is . If the text is found, it's replaced with was .
Here's the function:
Here's the form:
Previous Example-|-Next Example-|-Return to Chapter Listing