tags:

views:

1325

answers:

12

Is there a site online that lists common regular expressions or has a utility to help you create one based on sample text?

Thanks!

A: 

this one maybe?

Fredou
+1  A: 

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.

Quintin Robinson
+1  A: 

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

Binary Worrier
+10  A: 
DeletedAccount
+12  A: 

The most known regular expression sites are:

http://www.regular-expressions.info/

http://www.regexbuddy.com/

http://regexlib.com/RETester.aspx

Here you have a Regular Expression cheat sheet:

http://www.addedbytes.com/cheat-sheets/regular-expressions-cheat-sheet/

netadictos
A: 

I love the Regular Expression Powertoy:

http://regex.powertoy.org/

Lets you build expressions in several common formats and interactively see the matches in the sample text of your choice. Dynamite tool!

Sean McMains
A: 

For a Windows RegX Tool

Try M Squared Technologies - Regx - It is free. Good for single line, trial and error.

http://mSquaredTechnologies.com

A: 

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.

Jan Goyvaerts
+1  A: 

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.

jkchong
A: 

RegexPal is an awesome online regular expression checker built in JavaScript. It also contains a quick reference right on the site and a link to a near complete reference from developer.mozilla.org.

jonyamo
A: 

The Regexp::Common module on CPAN lists many common regular expressions.

Stig Brautaset
A: 

online regex checker from logiclabz.com found useful to me.

yogesh