3 ms·
Hi, I'm the author of this page. This tool has a lot of complexity in it and a huge number of corner-cases. If you discover any bugs or XSS vulnerabilities, f
by robertelder 6y ago
Hi, I'm the author of this page. This tool has a lot of complexity in it and a huge number of corner-cases. If you discover any bugs or XSS vulnerabilities, feel free to let me know.
- simonebrunozzi 6y agoThis is fantastic, thanks for sharing it. I wish I had it when I was a CS professor in 2004-2006, teaching Compilers to 2nd year university students. They would have found it really useful.
- andialo 6y agoThat's really impressive work. What flavor of regular expressions do you follow there?
- robertelder 6y agoI tried to follow a middle-of-the-road works mostly everywhere made up flavour. Here is a grammar for it: https://blog.robertelder.org/regular-expression-parser-grammar/ https://blog.robertelder.org/regular-expression-parser-gramm... I may add to it in the future if there is enough interest. At the moment it doesn't support a few common things like word breaks and backreferences, but I don't think it'd be too hard to add.
- indentit 6y agoAny chance of open sourcing it so we can contribute some regex features to your awesome project? :)
- chii 6y agoI tried using this expression: ^((?:(?:https?|ftps?):\/\/)|irc:\/\/|mailto:)([\w?!~^\/\\#$%&'()*+,\-.\/:;<=@]*[\w~^\/\\#$%&'()*+,\-\/:;<=@]) and it seems to fail to visualize it.
- robertelder 6y agoThe (?:stuff) part is for a non-capturing group which I didn't add support for. Maybe in the near future. That would be one of the easiest features to add since the tool also doesn't support backreferences yet. Edit: Actually, since the non-capturing group part doesn't add much here, you can just remove the '?:'s and this works: https://blog.robertelder.org/regular-expression-visualizer/?the_regex=%5E(((https%3F%7Cftps%3F)%3A%5C%2F%5C%2F)%7Circ%3A%5C%2F%5C%2F%7Cmailto%3A)(%5B%5Cw%3F!~%5E%5C%2F%5C%5C%23%24%25%26'()*%2B%2C%5C-.%5C%2F%3A%3B%3C%3D%40%5D*%5B%5Cw~%5E%5C%2F%5C%5C%23%24%25%26'()*%2B%2C%5C-%5C%2F%3A%3B%3C%3D%40%5D)&the_subject=mailto%3A%5Ep81 https://blog.robertelder.org/regular-expression-visualizer/?...
- Serow225 6y agoThe first one that I tried also failed for the same reason, FWIW. Cool tool! :)
- mlyle 6y agoI'm having trouble with backtracking and groups. It's possible I'm doing something wrong, but [bc]*(cd)+ doesn't seem to match cbcdcd Nor does the simpler a*(ab) match aab But a*ab matches aab.
- robertelder 6y agoYou found a bug. The bug was: When I was computing the animation frames for the visual, after a backtracking event, I forgot to restore the 'progress' values for the PROGRESS nodes to what they were before the stack push took place. I think I fixed this issue, and I just pushed an update which should appear any second when the cache invalidates.
- mlyle 6y agoCool! Thanks for looking at it/fixing it. P.S. The whole split() thing you do is an interesting hack to not have to preserve/rewind so much state. :D I've never quite seen fork() used so...