RegEx101.com now offers a debugger
regex101.com
RegEx101.com now offers a debugger
1–10 of 35 posts
Re: RegEx101.com now offers a debugger
#2Would be ultra-cool if you could propose a "generate a matching sample" button.
Re: RegEx101.com now offers a debugger
#3Forgot to tell you how to use it. Simply insert an expression and some text and press the little red button right above the input for the regex. That's all you have to do! Enjoy :)
Re: RegEx101.com now offers a debugger
#4Would be ultra-cool if you could propose a "generate a matching sample" button.
I have thought about this, but in cases where it would be useful, it's impossible to generate a sample match string. For example, creating a match string for /(?:a|[bc])efg?/ is super simple, but for something like: /(ab(?1)*)/ it becomes much harder. Not to mention the performance hit you would see for these more complex expressions. (These are just dummy expressions for illustrative purposes, but I'm sure you get my gist.)
Re: RegEx101.com now offers a debugger
#5That's funny. Just yesterday I needed that and used pythex and a bunch of other similar 'testers' to make sure my regular expression was good. It was, but it somehow didn't work on the Mozilla Add-On Builder.
After asking a question on the #jetpack channel, members have spotted the mistake: The regex was correct, but it needed to "match the exact string" as mentioned on the doc. I've read it, but didn't understand that point. There was a missing "." at the beginning and the end. So /.regex.*/
Thanks for putting this.
Re: RegEx101.com now offers a debugger
#6http://rubular.com/ is also really great! I use it often when programming ruby regular expressions. Fill in a batch of test strings into the box, then run your regular expression against it, and instantly see (visually) what is happening. This is a BIG plus coming from perl regex 10 years ago ;) This is not a dig a perl regex, but I just remember it was a trial and error loop, where I would continually be iterating the script to see if it worked, where as with this webpage, you just iterate, more quickly.
They also have a great example:
test string:
Today's date is: 9/28/2013.
regex:
(?\d{1,2})\/(?\d{1,2})\/(?\d{4})
result:
month 9
day 28
year 2013
Screenshot here: http://i.imgur.com/ixyHRde.pngRe: RegEx101.com now offers a debugger
#7http://www.regexper.com is also awesome to visualize regular expressions.
Re: RegEx101.com now offers a debugger
#8And a couple of alternatives:
(for Python flavor:
https://www.debuggex.com/?flavor=python )
and one more Python + regex:
Re: RegEx101.com now offers a debugger
#9Would be ultra-cool if you could propose a "generate a matching sample" button.
Take a look at http://fent.github.io/randexp.js/ if you want something that will do this
Re: RegEx101.com now offers a debugger
#10http://txt2re.com/ is my favorite RegEx tool. It goes beyond just testing your regular expressions against a sample. It builds the pattern for you and generates the code in different languages.