Feb 01, 2009
Must Have Tool For RegEx Work
Like RegEx, but dislike its complexity?
Never fear! RegExr is here! This is a great, must-have tool that allows you to remove the typical iterative guess-work loop that happens when writting Regular Expressions. I don’t know about you, but normally, this is my RegEx process:
- Write what I think will work for a RegEx match.
- Upload and test.
- Crap, I’m wrong.
- Write it again.
- If you haven’t done this 5-7 times yet, Go To Step 2, otherwise Exit.
Know what I mean? RegEx is one of those things that I’ve used quite a bit over the years, but not enough to actually remember the syntax off-hand, like some can. In fact, each time I use RegEx, I kinda have to relearn it a bit. Thus, the iterative process above.
Well, RegExr ends all that, as it allows you to see what your expressions are matching in real time! To quote Mr. Frank: “Genius!!”
Its simple to use too. All you have to do is enter some sample text that you’d like to match in the big text box provided, and then use the top entry area to start writing an expression. Bits of the sample text that are matched by your expression will be highlighted, as you can see in the pic below.

First, type in text that you want to match. Second, start writing your expression and watch for highlights below.
RegExr also has a Replace mode, that allows you to watch the replacements happen in real time. This is particularly helpful when writing preg_replace PHP statements, or when you are using something like RedirectMatch for 301 URL redirects.
RegExr also has helpful light weight RegEx documentation and examples available right in the tool. Even better, this great tool has a desktop version for download as well. Just look in the lower right hand corner, under the docs section, for the current desktop download URL. As of this writing, you can find the desktop tool here.
Best of all, this awesome tool is FREE!









It’s ok to have a comment.