Live data from Hacker News

Regexper: Beautiful regexp visualizations

regexper.com

21–30 of 132 posts

Re: Regexper: Beautiful regexp visualizations

#21

Neither beautiful nor a visualization really. For the uninitiated, there's an isomorphic relationship between regular expressions (not PCREs which are way more complicated) and finite state automata proving that if you have a regexp you can generate a FSA for it, and visa versa. What we have here is a system that generates a graph of the finite state automaton for any given regular expression. Neat project, misleadin…

Huh. I wonder if it could handle ^Snarky\s(ass)?\s(Know\sIt\sall)?comment

Re: Regexper: Beautiful regexp visualizations

#27

Neither beautiful nor a visualization really. For the uninitiated, there's an isomorphic relationship between regular expressions (not PCREs which are way more complicated) and finite state automata proving that if you have a regexp you can generate a FSA for it, and visa versa. What we have here is a system that generates a graph of the finite state automaton for any given regular expression. Neat project, misleadin…

Sorry, but how is that not a visualization? If you're learning regular expressions that's about the best thing you could possibly 'see', even though it doesn't show matches for specific input. And I do actually think it's beautiful. I pasted in a huge regex and was delighted at the output.

Re: Regexper: Beautiful regexp visualizations

#30
Breaks for:

  ^([^\W]+)@((?:[a-zA-Z0-9-]+\.)+(?:org|com|net|gov))$
Though this works:

  ^([^\W]+)@([a-zA-Z0-9-]+\.)+(?:org|com|net|gov)$
And it doesn't seem to be the nested groups that are screwing it up because this works:

  ((?:tinker|tailor)+(?:soldier|spy))
Post reply on HN