O'Reilly logo

Inside JavaScript by Steven Holzner

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 20. The RegExp Object: Working with Regular Expressions

The RegExp Object: Working with Regular Expressions

One of the powerful aspects of JavaScript is its capability to work with text. Ever since Internet Explorer 4.0 and Netscape Navigator 4.0, that has been augmented by being able to work with regular expressions. Regular expressions enable you to handle not only text strings as variables, but also work with the text content of those strings.

Using a regular expression, you can specify what kind of text substrings you want to match and work with. For example, here’s how I’m using the regular expression /[aeiou]/ to search text in a text field for vowels, and if any vowels are found, to ...

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