55

I'm looking for an online utility that will prettify and add explanatory comments to a regular expression. Does one exist?

Andy E
  • 311,406
  • 78
  • 462
  • 440
  • i have made some simple [regex-analyzer](http://foo123.github.io/examples/regex-analyzer/) and [regex-composer](http://foo123.github.io/examples/regex-composer/) online in javascript (which include a couple of twists as well) – Nikos M. Aug 05 '14 at 21:07

5 Answers5

52

I like the online tool: http://regexr.com

When you hover over the regular expression you will get an explanation of that part.

Andy E
  • 311,406
  • 78
  • 462
  • 440
Rody van Sambeek
  • 2,663
  • 1
  • 20
  • 38
  • 5
    it'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. – Acumenus Feb 26 '14 at 22:30
  • 3
    From 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
  • 3
    It doesn't seem to explain the "number of steps" like regexbuddy does, unless I'm missing something. – Wildcard Mar 19 '16 at 00:06
  • 1
    It'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
23

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.

River
  • 7,472
  • 11
  • 47
  • 61
barfuin
  • 14,995
  • 9
  • 77
  • 120
6

regexpal is the one I always use. I prefer it to the Flash-based RegExr.

Joe Shaw
  • 20,211
  • 16
  • 63
  • 87
6

There's a bunch of them listed in Steven Levithan's blog.

Tim Pietzcker
  • 297,146
  • 54
  • 452
  • 522
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,342
  • 1
  • 15
  • 30