TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Regex Visualization: give it a regex and see the state diagram

67 pointsby jjguyover 14 years ago

11 comments

_deliriumover 14 years ago
Two other regex-understanding tools I've found useful:<p><a href="http://www.regexbuddy.com/" rel="nofollow">http://www.regexbuddy.com/</a><p><a href="http://www.regexio.com/" rel="nofollow">http://www.regexio.com/</a>
评论 #2130674 未加载
评论 #2131435 未加载
turbodogover 14 years ago
It would be more useful if the state diagram page displayed the original regex.
thisrodover 14 years ago
I think the ultimate tool for understanding regexps is Russ Cox's notes:<p><a href="http://swtch.com/~rsc/regexp/" rel="nofollow">http://swtch.com/~rsc/regexp/</a><p>When explained well, the big picture of NFAs and DFAs is bog simple. I'm sure some of the details are messy, but I expect they rarely matter.
abrahamover 14 years ago
Visualization of the perfect email regex: <a href="http://goo.gl/p80Ky" rel="nofollow">http://goo.gl/p80Ky</a><p>Regex source: <a href="http://fightingforalostcause.net/misc/2006/compare-email-regex.php" rel="nofollow">http://fightingforalostcause.net/misc/2006/compare-email-reg...</a>
评论 #2131764 未加载
VeXocideover 14 years ago
Unfortunately it doesn't allow me to enter the regular expression found here: <a href="http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html" rel="nofollow">http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html</a>. It's horrendous I but would love to see it visualized.
nerfhammerover 14 years ago
The re.DEBUG flag for the python re module is also really useful in this regard
k4stover 14 years ago
This is nice for visualizing an NFA and the minimized DFA for asome regular expression (note: regular!!): <a href="http://osteele.com/tools/reanimator/" rel="nofollow">http://osteele.com/tools/reanimator/</a>. The aforementioned tool also lets you give input and highlights the current states of each FA.
dpkendalover 14 years ago
Kept giving me errors about unbalanced brackets, but the same regexps work perfectly as patterns in BBEdit (PCRE) and in Ruby (Onig).
js4allover 14 years ago
This is really helpful. I always struggle with regex expressions when they reach some complexity.
handlerover 14 years ago
awesome. the best would be if you could go in the opposite direction. like if you could create regular expressions in the image view and have it output the text version.<p>this would probably help a lot of people who aren't 'ninjas' like you and me ;?j
Andysover 14 years ago
Was the visualisation done with a free library? Anyone know the name of it?