Regular Expressions in JavaScript 1.2

One of the most powerful new features of JavaScript 1.2 is a set of objects and methods to provide regular expression functionality. Perl programmers have relied on regular expressions for years to do pattern matching and pattern manipulation, and now that power is available in any browser that supports JavaScript 1.2. Pattern matching is useful for analyzing user input, searching within a page, and many other situations. The JavaScript String object uses these regular expression methods:

 search()replace()match()split()

Nearly all the regular expression conventions that Perl uses also apply to JavaScript, so Perl programmers should feel right at home with JavaScript regular expressions.

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Overview

Recent Articles: