55

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

Andy E
  • 338,112
  • 86
  • 474
  • 445
  • 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
  • 338,112
  • 86
  • 474
  • 445
Rody
  • 2,675
  • 1
  • 22
  • 40
  • 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. – Asclepius 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
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.

River
  • 8,585
  • 14
  • 54
  • 67
barfuin
  • 16,865
  • 10
  • 85
  • 132
6

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

Joe Shaw
  • 22,066
  • 16
  • 70
  • 92
6

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

Tim Pietzcker
  • 328,213
  • 58
  • 503
  • 561
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