O'Reilly logo

JavaScript by Example, Second Edition by Ellie Quigley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 17. Regular Expressions and Pattern Matching

image

17.1 What Is a Regular Expression?

A user is asked to fill out an HTML form and provide his or her name, address, and birth date. Before sending the form off to a server for further processing, a JavaScript program checks the form to make sure the user actually entered something, and that the information is in the requested format. We saw in Chapter 11, “Working with Forms and Input Devices,” some basic ways that JavaScript can check form information, but now with the addition of regular expressions, form validation can be much more sophisticated and precise. Regular expressions are also useful ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required