Validating an Email Address with Regular Expressions
Validating a File Name
Extracting Strings
Formatting Strings
Formatting and Sorting Strings
Formatting and Validating Strings
Replacing Elements using Regular Expressions
To use this script on your own page, click in the text area below, select all, and copy to grab the script. Then, just paste into your own page — and you're done.
See it run: Validating an Email Address with Regular Expressions
This JavaScript, like Script 7.15, validates e-mail addresses. But because it uses regular expressions, the script is much shorter.
This is the HTML file for the e-mail validation example.