I'm looking for an online utility that will prettify and add explanatory comments to a regular expression. Does one exist?
Asked
Active
Viewed 3.3k times
5 Answers
52
I like the online tool: http://regexr.com
When you hover over the regular expression you will get an explanation of that part.
-
5it's been almost 3 years from this post and this is still best online regex editor – confiq Jan 21 '13 at 09:00
-
How do I even select a language? Surely the syntax is not the same for various languages. – Asclepius Feb 26 '14 at 22:30
-
3From RegExr's help: _RegExr uses your browser's RegExp engine for matching, and its syntax highlighting and documentation reflect the JavaScript RegExp standard._ Which makes it of marginal utility for determining differences between various regex implementations. – Perry Jan 09 '16 at 21:02
-
3It doesn't seem to explain the "number of steps" like regexbuddy does, unless I'm missing something. – Wildcard Mar 19 '16 at 00:06
-
1It's good, maybe the best online, and still easily outclassed by regex buddy. And I mean both for crazy power user productivity *and* for people who just want maximum ease of use, or even for learning the basics. – whitneyland Nov 24 '17 at 17:24
24
For what it's worth, I also like:
- regex101.com, which is quite powerful, but technical. It features timing and steps taken results as well as permalinks for sharing a regex with explanation and test data.
- regexper.com, which draws railroad diagrams of regexes. The results are very nice to look at and easy to understand, but there are no textual explanations.
Both are free to use.
-
2I find regex101 most usable in terms of syntax highlighting and explanation. +1 for that. – Piotr Zierhoffer Oct 20 '15 at 15:11
-
Of the ones mentioned/googled, regex101 just now worked best for a Python RE (evaluated on paste, works). – handle Jun 23 '16 at 05:07
6
There's a bunch of them listed in Steven Levithan's blog.

Tim Pietzcker
- 328,213
- 58
- 503
- 561
-
Some great links there. I love this one: http://osteele.com/tools/reanimator/ – Andy E Mar 22 '10 at 18:51
2
I currently use http://rick.measham.id.au/paste/explain.pl from Rick Measham. It is a regex explanation tool that simply works.

TheodorosPloumis
- 2,396
- 1
- 17
- 31