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)
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
I use both for different reasons. (From memory I think one does replacements better) Both are fantastic tools. My first port of call when trapped with a tricky regex.
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.
They probably don't but still kind of hard to be sure. In principle they could introduce it at any given time without anyone noticing for a while. Of course, once someone does notice, the shit will hit the fan.
Anyway, I share your nagging doubt and I'd never paste any text containing sensitive information into any text pane on a web page, not regexr, not JSON formatters, not anywhere.
So far, I've been using regex101 even for building C# .NET regex because I haven't needed Microsoft-specific behavior.
That regexhero.net is an interesting link. I would have preferred that the website built a .NET compatible engine by extracting the actual source code[1] available from Microsoft. That way, it wouldn't require using the Silverlight plugin. However, I understand why Silverlight would be the easiest way.
I think the easier solution would be simply to write your tester in one of the .NET languages...
That seems to be the approach http://regexstorm.net/tester took, at least. It's low frills (only highlights matches), but it's good for making sure that the problem really and truly isn't some weird regex quirk.
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.
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.
i love regexbuddy. I made a similar app (regexpixie.com, windows exe) that also uses the blue-yellow coloring to differentiate between matches.
The biggest difference is that RegexPixie has really good support for named groups. Frankly, it's beyond me why people don't use named groups for regex documentation.
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/
It's got some decent built-in regex examples such as IP addresses, email addresses, dates, etc.
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.
I've been using Regex Coach at http://www.weitz.de/regex-coach/ for quite some time. This is a standalone tool on windows. An older release is available for Linux.
32 comments
[ 3.0 ms ] story [ 87.7 ms ] threadIt'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)
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.
Anyway, I share your nagging doubt and I'd never paste any text containing sensitive information into any text pane on a web page, not regexr, not JSON formatters, not anywhere.
I use regexhero.net for .NET regex support.
So far, I've been using regex101 even for building C# .NET regex because I haven't needed Microsoft-specific behavior.
That regexhero.net is an interesting link. I would have preferred that the website built a .NET compatible engine by extracting the actual source code[1] available from Microsoft. That way, it wouldn't require using the Silverlight plugin. However, I understand why Silverlight would be the easiest way.
[1] https://referencesource.microsoft.com/#System/regex/system/t...
and may also use transpiler: https://www.google.com/search?q=C%23+to+javascript+transpile...
That seems to be the approach http://regexstorm.net/tester took, at least. It's low frills (only highlights matches), but it's good for making sure that the problem really and truly isn't some weird regex quirk.
[1] http://www.regexbuddy.com/
1: http://jdon.at/HpTd+
The biggest difference is that RegexPixie has really good support for named groups. Frankly, it's beyond me why people don't use named groups for regex documentation.
It's got some decent built-in regex examples such as IP addresses, email addresses, dates, etc.
"As an aside, it's easy to test your understanding of regular expressions interactively: the program
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).
http://regexr.com/3f8ge
c.f. https://swtch.com/~rsc/regexp/regexp1.html
- Jamie Zawinski