Basic HTML version of Foils prepared 20 April 98

Foil 82 RegExp Object

From Overview of Advanced JavaScript -- Web Scripting Language CPS616 Technologies of the Information Age -- Spring Semester 98. by Tom Scavo,Geoffrey C. Fox


An RegExp object (new in JavaScript 1.2) corresponds to a regular expression
There are two syntaxes: regexp1 = new RegExp( "pattern" ); regexp2 = /pattern/;
The latter "compiles" the pattern: regexp2 == regexp1.compile("pattern")
The RegExp object has two other methods: exec( str ) and test( str )



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998