JavaScript Kit: http://www.javascriptkit.com/javatutors/redev2.shtml
online tester: http://www.regular-expressions.info/javascriptexample.html
In firefox: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/RegExp
RegExp() Function
RegExp(pattern [, flags]) /pattern/flags
code: var re = new RegExp("\\w+") var re = /\w+/; Properties See also Deprecated RegExp Properties Note that several of the RegExp properties have both long and short (Perl-like) names. Both names always refer to the same value. Perl is the programming language from which JavaScript modeled its regular expressions. constructor Specifies the function that creates an object's prototype. global lastIndex multiline source Methods exec Executes a search for a match in its string parameter. test Tests for a match in its string parameter. toSource Non-standard Returns an object literal representing the specified object; you can use this value to create a new object. Overrides the Object.prototype.toSource method. toString Returns a string representing the specified object. Overrides the Object.prototype.toString method.
No comments:
Post a Comment