Live data from Hacker News

RegExr

regexr.com

41–50 of 57 posts

Re: RegExr

#41
post #19

I find RegEx's a bit cryptic. Sure, with enough practice one can read them, but I'd like an alternative that can easily break out chunks as named units. One can then reference the named units to compose new named units. Divide-and-Conquer. I'd like to see experiments in alternatives that provide this. It could help do for RegEx's what SQL's WITH statement did for long SQL statements. Backus–Naur Form could act as a s…

https://regexper.com will render your regex as railroad diagram. Maybe a help...

Re: RegExr

#42
post #6

I prefer regex101.com because that site assigns different colors to different capture groupings. I made a previous comment on this and why it's helpful: https://news.ycombinator.com/item?id=9581692 (For some reason RegExr.com is submitted to HN much more often than regex101.com. Is there a compelling advantage to RegExr that I've overlooked?)

regexr is open source, unlike regex101.

That doesn't make it better.

Re: RegExr

#43

My favorite is https://regex101.com/ But I've found all of the following to be useful: http://regexone.com/ http://www.regexpal.com/ http://www.rexegg.com/ http://regexr.com/ https://www.debuggex.com/ https://regexper.com/ https://www.regular-expressions.info/ http://www.cheatography.com/davechild/cheat-sheets/regular-e... http://eloquentjavascript.net/09_regexp.html http://www.smashingmagazine.com/2009/06/essential-…

Thanks for the list, but are they all the same? Why go to one over the other?

Some support other varieties of RegEx, and some have interesting features or different interfaces

Re: RegExr

#44

My favorite is https://regex101.com/ But I've found all of the following to be useful: http://regexone.com/ http://www.regexpal.com/ http://www.rexegg.com/ http://regexr.com/ https://www.debuggex.com/ https://regexper.com/ https://www.regular-expressions.info/ http://www.cheatography.com/davechild/cheat-sheets/regular-e... http://eloquentjavascript.net/09_regexp.html http://www.smashingmagazine.com/2009/06/essential-…

Time for a shout-out to Lea Verou's terrific fifty-minute tutorial "Regexplained" and accompanying regex playground:

https://youtu.be/EkluES9Rvak

https://regexplained.com/

Re: RegExr

#45
post #19

I find RegEx's a bit cryptic. Sure, with enough practice one can read them, but I'd like an alternative that can easily break out chunks as named units. One can then reference the named units to compose new named units. Divide-and-Conquer. I'd like to see experiments in alternatives that provide this. It could help do for RegEx's what SQL's WITH statement did for long SQL statements. Backus–Naur Form could act as a s…

Have you tried Parsing Expression Grammars (PEGs)? Most implementations allow use to name arbitrary sub-parsers, often using the programming language's native variables.

See for example Peg.js, LPEG (lua), etc. However, PEGs don't natively permit left recursion (note: some PEG implementations do add that on). If that's a problem, Earley parsers are a nice alternative.

Example of a calculator using Peg.js:

  start
    = additive

  additive
    = left:multiplicative "+" right:additive { return left + right; }
    / multiplicative

  multiplicative
    = left:primary "*" right:multiplicative { return left * right; }
    / primary

  primary
    = integer
    / "(" additive:additive ")" { return additive; }

  integer "integer"
    = digits:[0-9]+ { return parseInt(digits.join(""), 10); }

Re: RegExr

#46
post #15

This is nice, but my go to tool is: https://www.debuggex.com/ Not only does it tell you what everything means, but it visually displays it in a way that just makes sense.

This is always the one I forget about and have a hard time finding. It's not really great for editing but it's probably the best display I've seen in regards to debugging large regex.

Re: RegExr

#49

My favorite is https://regex101.com/ But I've found all of the following to be useful: http://regexone.com/ http://www.regexpal.com/ http://www.rexegg.com/ http://regexr.com/ https://www.debuggex.com/ https://regexper.com/ https://www.regular-expressions.info/ http://www.cheatography.com/davechild/cheat-sheets/regular-e... http://eloquentjavascript.net/09_regexp.html http://www.smashingmagazine.com/2009/06/essential-…

Not sure if it's completely comprehensive, but the clearest tutorial/reference of regex's that I've used is in the book "The AWK Programming Language" by Aho, Kernighan, Weinberger.

https://ia902309.us.archive.org/25/items/pdfy-MgN0H1joIoDVoI...

Re: RegExr

#50

My favorite is https://regex101.com/ But I've found all of the following to be useful: http://regexone.com/ http://www.regexpal.com/ http://www.rexegg.com/ http://regexr.com/ https://www.debuggex.com/ https://regexper.com/ https://www.regular-expressions.info/ http://www.cheatography.com/davechild/cheat-sheets/regular-e... http://eloquentjavascript.net/09_regexp.html http://www.smashingmagazine.com/2009/06/essential-…

I especially like debuggex for debugging/teaching purposes, here's an example: https://www.debuggex.com/r/SMLRfiyt0Ag2hXu5
Post reply on HN