Академический Документы
Профессиональный Документы
Культура Документы
http://www.regular-expressions.info/javascriptexample.html
Tutorial
Examples
Regex Tools grep PowerGREP RegexBuddy RegexMagic General Applications EditPad Pro Interactively create and test regular expressions with RegexBuddy. Create and analyze regex patterns with RegexBuddy's intuitive regex building blocks. Quickly test regular expressions on sample data and files in a safe sandbox. Debug regexes easily with real-time highlighting and informative regex match details. Get your own copy of RegexBuddy now.
Feel free to test JavaScript's RegExp support right here in your browser. Obviously, JavaScript (or Microsoft's variant JScript) will need to be enabled in your browser for this to work. Since this tester is implemented in JavaScript, it will reflect the features and limitations of your web browser's JavaScript implementation. If you're looking for a generalpurpose regular expression tester supporting a variety of regex flavors, grab yourself a copy of RegexBuddy. Learn how to use the JavaScript RegExp object. Regexp: Subject string:
1 of 2
3/7/2012 8:42 AM
http://www.regular-expressions.info/javascriptexample.html
<P>Regexp: <INPUT TYPE=TEXT NAME="regex" VALUE="\bt[a-z]+\b" SIZE=50></P> <P>Subject string: <INPUT TYPE=TEXT NAME="subject" VALUE="This is a test of the JavaScript RegExp object" SIZE=50></P> <P><INPUT TYPE=SUBMIT VALUE="Test Match" ONCLICK="demoMatchClick()"> <INPUT TYPE=SUBMIT VALUE="Show Match" ONCLICK="demoShowMatchClick()"></P> <P>Replacement text: <INPUT TYPE=TEXT NAME="replacement" VALUE="replaced" SIZE=50></P> <P>Result: <INPUT TYPE=TEXT NAME="result" VALUE="click the button to see the result" SIZE=50></P> <P><INPUT TYPE=SUBMIT VALUE="Replace" ONCLICK="demoReplaceClick()"></P> </FORM>
Regular Expressions Cookbook Jan Goyvaerts, Ste... Best Price $16.57 or Buy New $26.80
Privacy Information
Make a Donation
Did this website just save you a trip to the bookstore? Please make a donation to support this site, and you'll get a lifetime of advertisement-free access to this site!
Page URL: http://www.Regular-Expressions.info/javascriptexample.html Page last updated: 22 September 2010 Site last updated: 02 February 2012 Copyright 2003-2012 Jan Goyvaerts. All rights reserved.
2 of 2
3/7/2012 8:42 AM