
RegExr: Learn, Build, and Test RegEx - rinesh
http://regexr.com/
======
jasode
For those not aware of all the alternative online regex testers out there... I
prefer regex101.com because of the better color coding. I previously made a
snippet demonstrating that benefit:
[https://news.ycombinator.com/item?id=9581225](https://news.ycombinator.com/item?id=9581225)

~~~
sphix
Sometimes I wonder if these online tools mine data on text blobs and regex we
pass in. I can only imagine how potential IP could be leaked if the data was
correlated to a company that the user is using the tool from. Has anyone done
analysis to see whether to tools send data back to the servers? In theory the
entire app should be client side only.

~~~
macintux
I've never felt comfortable with password strength tools online for similar
reasons. Sure, most (maybe all) are local Javascript, but still.

~~~
ehsankia
Can you not monitor networking and make sure nothing is being sent back?

~~~
macintux
Sure, but it's a lot easier to just not use 'em.

~~~
ehsankia
Not really, these provide much needed help.

It's like saying, I'm gonna stick to Notepad and not use a proper IDE because
I'm not sure if they send the code I write back to themselves.

------
dang
My favorite of these, because it's the simplest:

 _" As an aside, it's easy to test your understanding of regular expressions
interactively: the program_

    
    
      $1 ~ $2
    

_lets you type in a string and a regular expression; it echoes the line back
if the string matches the regular expression._ "

From the classic book "The Awk Programming Language"
([https://news.ycombinator.com/item?id=13451454](https://news.ycombinator.com/item?id=13451454)).

------
andremat
Online regex testers are nice but nothing beats RegexBuddy [1] IMO. I have
fond memories of me using it while on high school to naively parse HTML using
regular expressions only. Good times.

[1] [http://www.regexbuddy.com/](http://www.regexbuddy.com/)

~~~
donatj
Came here to promote RegexBuddy myself. It's the one thing I truly miss in my
transition from Windows to Mac. I run it in WineBottler[1] now and it works
well enough but I'd pay good money for a native Mac version.

1: [http://jdon.at/HpTd+](http://jdon.at/HpTd+)

------
amingilani
Isn't this a repost? I discovered this tool a long time ago from HN and it has
been invaluable to me. I always open it up when I need to construct regular
expressions..

It's my second go-to programming website, the first being devdocs.io -- which
if you don't know about, you're welcome! (all the api docs loaded offline)

~~~
Klathmon
devdocs.io is not only a fantastic resource, but a very well run FOSS project
and a pretty damn good example of a well working web-app.

------
jesse_m
I just started dabbling in writing a major mode for Emacs and found there is a
great mode build in for testing Emacs regex. If you use Emacs, open a file and
then start the mode with "M-x re-builder". You can type regex in the input
buffer and see it highlighting in real time. It's pretty slick.

------
Zalastax
Complement with [https://www.debuggex.com](https://www.debuggex.com) to also
get an interactive finite automata (this can really help with understanding
what's going on)

------
jdironman
Not really a learning resource but more of general purpose tool which includes
support for Regex searching as well as a number of other operations is:
[https://gchq.github.io/CyberChef/](https://gchq.github.io/CyberChef/)

It's got some decent built-in regex examples such as IP addresses, email
addresses, dates, etc.

------
dsymonds
Seems broken. It doesn't implement a proper regular expression engine.

[http://regexr.com/3f8ge](http://regexr.com/3f8ge)

c.f.
[https://swtch.com/~rsc/regexp/regexp1.html](https://swtch.com/~rsc/regexp/regexp1.html)

------
anjanb
I've been using Regex Coach at [http://www.weitz.de/regex-
coach/](http://www.weitz.de/regex-coach/) for quite some time. This is a
standalone tool on windows. An older release is available for Linux.

------
brokenmachine
_Some people, when confronted with a problem, think "I know, I'll use regular
expressions." Now they have two problems._

\- Jamie Zawinski

------
jaimex2
Why is this on HN? It's literally the first result you get if you Google
regex.

------
stefs
for visualizing regular expressions i recommend
[https://regexper.com/#foo%20%5Ba-z%5D%2B%20bar](https://regexper.com/#foo%20%5Ba-z%5D%2B%20bar)

