Is there a site online that lists common regular expressions or has a utility to help you create one based on sample text?
Thanks!
Is there a site online that lists common regular expressions or has a utility to help you create one based on sample text?
Thanks!
there are some awesome tools for helping create regexs based on sample text, i think one is called regexbuddy (ill look that up when im not on my phone), but the site regexlib.com has alot of regexs for common purposes.
Regular-Expressions Info is a site that should give you what you need
Examples page has a nice selection of examples, and the tools page for utilites
The most known regular expression sites are:
http://www.regular-expressions.info/
http://regexlib.com/RETester.aspx
Here you have a Regular Expression cheat sheet:
http://www.addedbytes.com/cheat-sheets/regular-expressions-cheat-sheet/
I love the Regular Expression Powertoy:
Lets you build expressions in several common formats and interactively see the matches in the sample text of your choice. Dynamite tool!
For a Windows RegX Tool
Try M Squared Technologies - Regx - It is free. Good for single line, trial and error.
Since several people mentioned RegexBuddy, which I developed, I'll add that RegexBuddy includes a library of regular expressions for many common purposes.
I don't know of any tool on the market today that can auto-generate regular expressions based on sample text. Tools like RegexBuddy work the other way around. You create the regex, and the tool indicates if it matches your sample text or not. RegexBuddy does provide an Insert Token menu on the Create tab that makes it much easier to create the regular expression.
Roy Osherove has a nice set of free regex tools. In fact, I think Regulazy might be exactly what you are looking for. His tools page is down but you can find download links @ http://weblogs.asp.net/rosherove/pages/tools-and-frameworks-by-roy-osherove.aspx. Try searching his blog for more info on Regulazy.
The Regexp::Common module on CPAN lists many common regular expressions.