Basic HTML version of Foils prepared 16 June 98

Foil 58 RegExp Objects (cont'd)

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

Regular Expressions for Foil 58
1 String methods have been added to JavaScript 1.2 to handle regular expressions: search( regexp ); // like test(...) match( regexp ); // like exec(...) replace( regexp, newsubstr );
2 match(...) returns an array of strings
3 The split(...) method now takes a regular expression as optional parameter: var strArray = str.split( /\s*;\s*/ );

in Table To:


© 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