I’m very excited to announce that nearly 10 years after it first launched, RegExr has been updated to version 3. RegExr is an online tool to learn, build, and test Regular Expressions.
RegExr has a few key focuses, and we’ve worked to improve each of them with this version:
Creating and Testing RegEx
This version also makes it easier to debug patterns. It surfaces both errors that our parser detects and those generated by the RegEx engine. These should usually align, but can provide additional information when things go wrong.
Finally, improvements to the Details tool make it easier to dig into results, including highlighting groups within matches for PCRE.
Learning Regular Expressions
In v3 we’ve added more and better content to the Reference panel, including all (I hope) of the new syntax available to you in PCRE. To make it easier to find what you’re looking for, the Reference is now searchable.
The Explain tool does an even better job of describing how a pattern works. You can roll over parts of the description in Details to highlight them in the Expression (and vice versa). Click the description to open the Reference to that token.
As always, the searchable Community database provides a great way to find and rate patterns to solve specific problems.
Saving Your Work
Previously, saving your work in RegExr was pretty tenuous. You could favorite patterns, but they were just saved in your browser’s web storage. That meant they were volatile and couldn’t be accessed from other computers / browsers. If you really wanted to hold on to a pattern you’d created, you had to save a link to it. Not ideal.
RegExr v3 adds user accounts. You can sign in via GitHub, Facebook, or Google, and all of your created or favorited patterns will be saved to My Patterns. Patterns can now be made private, so that only you can access them.
The entire Save & Share UI was revamped to be more approachable.
It’s easier than ever to toss together a pattern and quickly share it with a co-worker. Hit Ctrl-S (Cmd-S on Mac), copy the URL, and share it. It’s also super simple to add your pattern to the Community from the Save & Share panel.
To share without saving a pattern (ex. generated dynamically from a service), you can use query string parameters that will prepopulate the respective fields. It looks like this: regexr.com/?expression=.&text=testing
A Beautiful, Usable UI
We’ve refined the UI you know and love. Everything is easier, snappier, and more responsive. The initial load has less files, and is about 200kb smaller overall, so you can get working faster. Design has been tweaked and polished, and we’ve made the sidebar collapsible to increase your workspace.
We’ve even made the whole site more mobile friendly. I don’t recommend editing Regular Expressions on your phone, but you can view a pattern someone shares with you, run a saved pattern against some copy / pasted text, check the Cheatsheet, or peruse the Reference at your leisure.
Most importantly, the whole project was rebuilt with a better architecture, and modern CSS / HTML / JS. This provides a foundation for continued momentum; expect to see more regular updates moving forward. To prove that point, I pushed out a v3.1 update while procrastinating on this blog post.