
RegExr: A website for interactive regex prototyping with syntax highlighting - sconxu
http://regexr.com/
======
jasode
Unfortunately, RegExr does not color-code the different capturing groups.

For example, replace the RegExr sample regex with "([A-Z])\w+\s\w(\d.\d)" and
compare[1][2] its color coding capability to the other regex helpers.

The other sites such as regex101.com & debuggex.com will delineate the capture
groups within the matched text using different colors. This is very helpful
for complex captures because making the boundaries visible can reveal bugs in
your thinking of what substrings the regex is actually capturing.

(I don't intend to be negative. If capture group color-coding is an easy
coding enhancement for RegExr, consider my comments as mentioning a minor
nit.)

[1][https://regex101.com/r/eB5jY1/1](https://regex101.com/r/eB5jY1/1)

[2][https://www.debuggex.com/r/mci3WLNmHGTEatf6](https://www.debuggex.com/r/mci3WLNmHGTEatf6)

(couldn't find a way to enable /g global on debuggex.com (even tried PCRE
option) but color boundaries still show up on the 1st capture group)

~~~
wodenokoto
Just wanted to chime in and give my recommendation for regex101.com that
parent links to. This is by far the best regex "composer" I have ever used, on
or offline.

~~~
piyush_soni
Yup. regex101.com is really awesome and has been a time saver for me many
times.

------
mraison
Nice work :) Looks like this tool puts the emphasis on the pedagogical aspect.

For development, the most fantastic tool that I know of in this space is
debuggex. Here is an example with roman numbers:

[https://www.debuggex.com/r/Xqlv3QcAuw_EgPSM](https://www.debuggex.com/r/Xqlv3QcAuw_EgPSM)

~~~
zatkin
Dude, that is way cool. This is like one step away from FSMs.

~~~
tsergiu
You can step through the FSM on Debuggex by using the sliders :)

------
rcaught
My favourite is still [https://regex101.com](https://regex101.com)

Example regex:
[https://regex101.com/r/wY0rM7/1](https://regex101.com/r/wY0rM7/1)

~~~
djhworld
Came here to give this a mention, it's a really valuable tool

------
chdir
I had the older version bookmarked
[http://gskinner.com/RegExr/](http://gskinner.com/RegExr/) which now redirects
to this site. Some other good sites that I've used are:

[http://regviz.org/](http://regviz.org/)

[https://regex101.com/](https://regex101.com/)

[http://osteele.com/tools/rework/](http://osteele.com/tools/rework/)

[http://www.rexv.org/](http://www.rexv.org/)

[https://www.debuggex.com/](https://www.debuggex.com/)

~~~
myfonj
I'd add [http://regexpal.com/](http://regexpal.com/) for historical
completeness. It's the first such tool I used and prefer it even today. Very
sad that from what it seems Steven Levithan sold entire domain recently and is
not updated anymore. Even permalinks broke last year. (I'm a bit worried,
what's up with Steven.)

------
nodesocket
RegExr looks really nice, but my go to is still
[http://rubular.com](http://rubular.com).

~~~
anon3_
What do you think makes it better? I think the UX on rubular is much cleaner.

Don't they both serve a different flavor of regex?

~~~
bradleyland
Rubular uses Ruby's regex engine (Oniguruma/Onigmo). Regexr uses your
browser's RegEx engine.

That doesn't make it "better", but it does mean they have slightly different
purposes. You can use Ruby specific regex features with Rubular, so it is
"better" for Ruby regex development.

As a general principle, I like to test against the same regex engine that I'll
use in production. If I'm writing Ruby, I'll use pry/irb or a tool like
Rubular. If I'm writing Javascript, you'll find me in the closet with the
barrel of a gun in my mouth... I mean, I'll test against my target browsers
using their respective web inspector, or use a tool like RegExr.

An example of the differences in the engines, the Onigmo engine supports
conditional sub-patterns:

Rubular: [http://rubular.com/r/zUwSsIi117](http://rubular.com/r/zUwSsIi117)

Regexr: [http://regexr.com/3b1vn](http://regexr.com/3b1vn)

As far as browsers go, they're actually pretty close most of the time. ECMA
specifies regex (I think), so if you stick to the ECMA standard, you _should_
be fairly safe. As with anything in browser-land, you'll encounter edge-case
inconsistencies that will bite you in the ass.

------
romankolpak
I have been a regular user of this website for quite some time now. I like the
UI and usability is great.

Also, [https://regex101.com](https://regex101.com) is very good alternative

------
notlisted
My favorite tool for quick regex definition to text extraction is
[http://txt2re.com/](http://txt2re.com/)

Paste a sample line, mark the parts you like, it generates a piece of code to
extract just those parts. Has saved me hours.

------
jbrooksuk
RegExr is my go to regular expression playground. I've been using it for many
years, back when it was on
[http://gskinner.com/RegExr](http://gskinner.com/RegExr)

It's evolved a lot since then :)

------
euan_torano
For anybody doing .NET development, RegexHero
([http://regexhero.net/tester](http://regexhero.net/tester)) is nice. It uses
Silverlight though...

------
janfoeh
Will be bookmarked alongside my other regex helpers.

One of my other favourites: [https://jex.im/regulex](https://jex.im/regulex) ,
a regex visualizer.

------
amenghra
[http://regexp.quaxio.com/](http://regexp.quaxio.com/) tries to act as a
linter.

~~~
hbbio
That's a great project by @amenghra and Facebook's Hack creator Julien
Verlaguet!

Don't know if it made HN when it was released.

~~~
girvo
Oh wow, always cool to see stuff Julian has done!

------
verytrivial
I've been programming for about two decades. I had composed three regexes
before my first coffee and before seeing this article this morning. My
problem: I _still_ don't have a good mnemonic to remember how magic differs
grep, egrep, vim, awk, Perl, Python, etc. If that this site had modes and
flavoured cheat-sheets I would live there!

~~~
cool-RR
I use RegexBuddy, it has a shitload of different modes.

~~~
wrath
I love and miss RegexBuddy! If only they had a Mac/Linux version :( I've had
thoughts about switching back to Windows while developing complex regular
expressions.

~~~
speedkills
Regexbuddy can be run on a Mac using Wine.

------
teddyh

      emacs
    
      M-x regexp-builder

------
Elrac
Sorry if this information is visible somewhere: Which dialect of regexp does
RegExr "do?"

In the past, when I've looked for a good Internet RegEx test site, I've had
trouble finding one that "does" the Java dialect.

------
vbezhenar
What I am missing is some kind of service to convert between different types
of regexes. Like Java, Intellij Idea Search&Replace, vim, less, grep, egrep,
sed. There are subtle (and sometimes not so subtle) differences between them
which I always forgetting and have to trial&error a bit.

I wish there would be one single standard to regexes. Great tool but difficult
to use because of many incompatible implementations.

------
alexcason
I've been using RegExr for years, it's the first place I go to when I have a
tricky regular expression to put together. It works really well.

------
kachhalimbu
My favorite is regulex[1] a visual explanation of regex

[1] [https://jex.im/regulex](https://jex.im/regulex)

~~~
addandsubtract
[http://regexper.com/](http://regexper.com/) does the same thing.

I just wish there was something like this in reverse. Somewhere I can drag and
drop the visual nodes and have it return the regex string to me.

------
hienchu
This is awesome, but I like [https://regex101.com/](https://regex101.com/)
more

------
gmac
Suggestion: allow use of extended regexps too (I have a quick JS function to
enable this, which you can regard as public domain:
[http://blog.mackerron.com/2010/08/08/extended-multi-line-
js-...](http://blog.mackerron.com/2010/08/08/extended-multi-line-js-
regexps/)).

------
psk
Sites like this is great and all, but I wish they included some commonly used
regexes. Like a list of 'good' regexs to validate phone numbers, emails and
other common stuff.

It would actually be pretty cool to have a site like this except you could add
the regex to a list, and then people could upvote the regexe depending on the
quality of it.

~~~
psk
...and I just checked the community link. Way to go :-)

~~~
addandsubtract
There's also [http://www.regxlib.com/](http://www.regxlib.com/)

------
gnrlbzik
I've been looking for something like this on mac since I moved away from
windows long time ago, no RegEx Buddy, such a great tool too. I think that I
discovered regexr a year ago. This is such a great tool. Much appreciated work
from @gskinner and community.

------
crdoconnor
I've tried a number of these and this is the one I've gotten along with best:

[http://jsregex.com/](http://jsregex.com/)

Simple, minimalist, takes up all available space in the viewport & also works
offline if you save the page.

------
thomasfl
I really like the regexp syntax coloring. What makes me still reach out for
rubular.com, is actually the regexp cheat sheet on the bottom of the page.
After 25 years, I still like to have a cheat sheet for regexp to remember all
the swithces etc.

------
XorNot
Probably my favorite tool on the internet. One thing I wish it had was an
implicit select option like grep -o since I frequently find myself using it to
do interactive text manipulations for one offs.

------
rane
[http://refiddle.com/](http://refiddle.com/) is a similar service I've found
useful.

------
kyberias
Is there a service that would allow one to enter positive matches and negative
matches and it would then deduce a regex suggestion for that?

------
nathancahill
My favorite for Python is still
[http://www.pyregex.com/](http://www.pyregex.com/)

------
paradox95
This has been my go to regex testing site for years. Absolutely love it.

------
r4pha
Cool! These are the same guys behind CreateJS. Amazing work as well.

------
alz
this has been posted a few times, but is a great resource

------
anon3_
Author:

\- When did you begin this?

\- What front-end JS framework did you program this in?

\- How many visitors do you get per day?

~~~
m_t
You will probably get some info from the author's blog:
[http://blog.gskinner.com/archives/2014/03/regexr-v2-build-
te...](http://blog.gskinner.com/archives/2014/03/regexr-v2-build-test-learn-
regular-expressions.html)

