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 ) |