RegExr: A website for interactive regex prototyping with syntax highlighting
41–50 of 72 posts
Re: RegExr: A website for interactive regex prototyping with syntax highlighting
#42Unfortunately, RegExr does not color-code the different capturing groups. For example, replace the RegExr sample regex with "([A-Z])\w+\s\w(\d.\d)" and compare[1][2] its color coding capability to the other regex helpers. The other sites such as regex101.com & debuggex.com will delineate the capture groups within the matched text using different colors. This is very helpful for complex captures because making the bou…
this seems incredibly easy to add given what they're done - just send a note to the author. I can't imagine how it wouldn't take seconds to implement.
So go on, try it right away :] I think it might be possible to get it done with breaking original regexp into group tree and look what each part did on concrete match from global search using non-global match on local instances. You'd need own regex parser and watch out for deep nesting.
Re: RegExr: A website for interactive regex prototyping with syntax highlighting
#43I had the older version bookmarked http://gskinner.com/RegExr/ which now redirects to this site. Some other good sites that I've used are: http://regviz.org/ https://regex101.com/ http://osteele.com/tools/rework/ http://www.rexv.org/ https://www.debuggex.com/
Re: RegExr: A website for interactive regex prototyping with syntax highlighting
#44http://regexp.quaxio.com/ tries to act as a linter.
Don't know if it made HN when it was released.
Re: RegExr: A website for interactive regex prototyping with syntax highlighting
#45Re: RegExr: A website for interactive regex prototyping with syntax highlighting
#46Re: RegExr: A website for interactive regex prototyping with syntax highlighting
#47Earlier quoted context omitted.
this seems incredibly easy to add given what they're done - just send a note to the author. I can't imagine how it wouldn't take seconds to implement.
It is actually true for PCRE (PHP), Python, and and a bit for non-global Javascript regex. For global matches in JS it is, I dare to say, incredibly difficult, if not impossible. I haven't seen visualised submatches in JS anywhere. I'd be happy to be mistaken and corrected. So go on, try it right away :] I think it might be possible to get it done with breaking original regexp into group tree and look what each part…
Re: RegExr: A website for interactive regex prototyping with syntax highlighting
#48It's evolved a lot since then :)
Re: RegExr: A website for interactive regex prototyping with syntax highlighting
#49Earlier quoted context omitted.
It is actually true for PCRE (PHP), Python, and and a bit for non-global Javascript regex. For global matches in JS it is, I dare to say, incredibly difficult, if not impossible. I haven't seen visualised submatches in JS anywhere. I'd be happy to be mistaken and corrected. So go on, try it right away :] I think it might be possible to get it done with breaking original regexp into group tree and look what each part…
Then I think I misunderstood what jasode was asking. Specifically, the example (our link) already names groups if you hover over matching text (group #1, etc) - I thought they were just asking for the highlight color to correspond to the group # listed.
Nevertheless, I prefer explicit color-coding highlighting the boundaries instead tooltips displaying the offset numbers.
Re: RegExr: A website for interactive regex prototyping with syntax highlighting
#50Earlier quoted context omitted.
Then I think I misunderstood what jasode was asking. Specifically, the example (our link) already names groups if you hover over matching text (group #1, etc) - I thought they were just asking for the highlight color to correspond to the group # listed.
Thanks for mentioning the tooltip popups. I didn't realize RegExr used mouseover/hover events on the matching text since the other regex sites don't do that. (It seems like non-obvious UX/UI but I now notice that the bottom left corner does say "Roll over a match or expression for details" -- but who reads the instructions?!?! Nobody's got time fo 'dat.) Nevertheless, I prefer explicit color-coding highlighting the b…
anyway since they have the logic to already know what to put in the tooltip, making that number determine a color seems like it would be simple, almost as simple as appending it to the tooltip. (if indeed that's all that's missing.)
email the author your suggestion :)