How can I test the same regex against different regular expression engines?
- @Lasse: how is this not constructive again?Dan Dascalescu– Dan Dascalescu2014-02-26 04:43:28 +00:00Commented Feb 26, 2014 at 4:43
- @DanDascalescu This question is far too broad.chrylis -cautiouslyoptimistic-– chrylis -cautiouslyoptimistic-2014-02-26 05:07:03 +00:00Commented Feb 26, 2014 at 5:07
- @chrylis: Edited. I've narrowed it down to testing the same regexp against multiple engines. Please see @Shog9's comments on moderating tool recommendations as well.Dan Dascalescu– Dan Dascalescu2014-02-26 05:17:55 +00:00Commented Feb 26, 2014 at 5:17
- @DanDascalescu You've completely misunderstood the original intent of the question but since I don't mind the question you're asking I don't see any point in editing it back.Onorio Catenacci– Onorio Catenacci2014-02-26 13:47:58 +00:00Commented Feb 26, 2014 at 13:47
- 1@DanDascalescu - you're making a fool of yourself here - this question was asked in August 2008 - i.e. the first few days of SO's existence. Running around down-voting answers and resurrecting questions which are now into their second half decade just makes you look slightly unhinged.Will Dean– Will Dean2014-02-26 16:04:36 +00:00Commented Feb 26, 2014 at 16:04
29 Answers
The most powerful free online regexp testing tool is by far http://regex101.com/ - lets you select the RE engine (PCRE, JavaScript, Python), has a debugger, colorizes the matches, explains the regexp on the fly, can create permalinks to the regex playground.
Other online tools:
- http://regexpal.com/ - powered by the XRegExp JavaScript library
- http://www.rubular.com/ - Ruby-based
- Perl Regex Tutor - uses PCRE
Windows desktop tools:
- The Regex Coach - free Windows application
- RegexBuddy recommended by most, costs US$ 39.95
Jeff Atwood [wrote about regular expressions]( post:).
Other tools recommended by SO users include:
- http://www.txt2re.com/ Online free tool to generate regular expressions for multiple language (@palmsey another thread)
- The Added Bytes Regular Expressions Cheat Sheet (@GateKiller another thread)
- http://regexhero.net/ - The Online .NET Regular Expression Tester. Not free.
7 Comments
I use Expresso (www.ultrapico.com). It has a lot of nice features for the developer. The Regulator used to be my favorite, but it hasn't been updated in so long and I constantly ran into crashes with complicated RegExs.
1 Comment
Here are some for the Mac: (Note: don't judge the tools by their websites)
- RegExhibit - My Favorite, powerful and easy
- Reggy - Simple and Clean
- RegexWidget - A Dashboard Widget for quick testing
1 Comment
RegexBuddy is a weapon of choice
1 Comment
I use the excellent and free Rad Software Regular Expression Designer.
If you just want to write a regular expression, have a little help with the syntax and test the RE's matching and replacing then this fairly light-footprint tool is ideal.
Comments
couple of eclipse plugins for those using eclipse,
http://www.brosinski.com/regex/
http://www.bastian-bergerhoff.com/eclipse/features/web/QuickREx/toc.html
Comments
I agree on RegExBuddy, but if you want free or when I'm working somewhere and not on my own system RegExr is a great online (Flash) tool that has lots of pre-built regex segments to work with and does real-time pattern matching for your testing.
2 Comments
In the past I preferred The Regex Coach for its simplistic layout, instantaneous highlighting and its price (free).
Every once in awhile though I run into an issue with it when trying to test .NET regular expressions. For that, it turns out, it's better to use a tool that actually uses the .NET regular expression engine. That was my whole reason to build Regex Hero last year. It runs in Silverlight, and as such, runs off of the .NET Regex Class library directly.
2 Comments
I'll add to the vote of Reggy for the Mac, gonna try out some of the other ones that Joseph suggested and upvote that post tomorrow when my limit gets reset.
Comments
+1 For Regex Coach here. Free and does the job really well.
Comments
I am still a big The Regulator fan.
There are some stability problems but these can be fixed by disableing the Intellisense. It gets mad with some expressions and typos in building an expression.
Would love it if Roy Osherove updated, but looks like he is busy with other things.
Comments
I like to use this online one: http://www.cuneytyilmaz.com/prog/jrx/ Of course, it'll be javascript regexp, but I've never yet done anything clever enough to notice the difference.
Comments
I personally like the Regular Expression Tester.
It's a free firefox plugin, so always on!
Comments
This regex tester able to test javascript, php and python http://www.piliapp.com/regex-tester/
Comments
RegExr for testing with the Actionscript 3 (whichever standard that may be)