Regex testing is cool, but there are dozens of these kinds of tools and I'd really love to see some other kinds of regex tools<p>- A list generator. Enter a regex, set repetition operator constraints (e.g. <i>->{0,3}, +->{1,3}, .->[A-Z0-9 ], etc.) and have it exhaustively generate a list of matching strings. This is helpful when you have a regex that matches your test strings, but also to let you know what </i>else* it'll match. The constraints are to keep it from generating infinite lists. Even if it jams out tens or hundreds of thousands of produced strings, it's still useful. I've found that most people just build up the first regex that will "match" their input text, and move on without thinking about all the edge cases they've just introduced.<p>- A regex assembler optimizer. Give it a few regexes, have it assemble them into one large regex and optimize it. It's got to do better than just | or'ing all the regexes together. I've seen some work done on using trie variants to do this, but have no idea how far along the work is on this.<p>- A regex list generator. Give it a list of strings you want to match and have it generate a regex. A sliding "fuzziness" control could tell it to take alternates in the same character position and substitute either<p>1. Just the characters in the given list - a, t and q in the same position generates a|t|q<p>2. A representative narrow character range - if I give it a|t|q it knows to use [A-Z] while a|t|q|4 might generate [A-Z0-9]<p>3. A larger character range, a|t|q might just go ahead and produce [A-Z0-9]<p>4. An even larger character range, whatever it is, just use .<p>And maybe another slider for repetitions, so if I end up with [A-Z][A-Z][A-Z], should it just produce [A-Z]{3} or can I go ahead and have it [A-Z]+<p>Jam the result through an optimizer (see previous idea above) to clean up the regex and maybe even run it through the list generator to check if it produces only what you want.
People just cannot do unicode even remotely properly. Just cannot.<p>𝄞 is one char, not two. привет is matched by \w+.<p>PS there's some advanced stuff but where is basic [[:posix:]] char classes?
> Uh-oh, it looks like your browser is not supported.<p>> RegExr only supports modern desktop browsers.<p>I'm using Firefox 30 on Ubuntu. I think it's plenty modern :)
Very nicely done. As someone else pointed out there are quite a few of these tools, but I think you've done a really nice job with this one. One suggestion: make the reference easier to scan at a top level as opposed to drilling down.
I'm guessing the following is either near-impossible or pure-impossible, but:<p>Is there a tool that allows you to highlight portions of a string and generate a corresponding regex? (i.e. the inverse of RegExr)
Reminds me of <a href="http://rubular.com/" rel="nofollow">http://rubular.com/</a>, except it isn't Ruby-focused and is more community-based. Seems pretty cool.
There is one for Javascript that I use pretty often: <a href="http://scriptular.com/" rel="nofollow">http://scriptular.com/</a> (based on the Ruby one: <a href="http://www.rubular.com/" rel="nofollow">http://www.rubular.com/</a>)
<a href="https://www.debuggex.com/" rel="nofollow">https://www.debuggex.com/</a> is a nice alternative that is a little different from other regex sites I've seen.