3 ms·
Show HN: Xeger – A semantic regex builder in JavaScript
- blainesch 11y agoInstead of 1 line, you can write 17! This tool is an anti-pattern. Just learn regex.
- taf2 11y agoI think it might make it easier to map a user interface to the regular expression e.g. Let a user interfaces choose meaningful things to match and how to match in succession and then output the final regular expression.
- jhare 11y agoAnd that one-line strategy worked out _great_ for Perl!
- o_____________o 11y agoThere are some other options: http://coffeescript.org/#regexes http://coffeescript.org/#regexes
- tvmalsv 11y agoPretty cool, nice work. I've done traditional regex for so long that reading the regex version of the url example was faster for me than reading the Xeger code. But, I know regex gives a lot of people trouble, and this provides a great alternative. Even though I'm comfortable with regex, I actually like this method. Seems like it would be less prone to errors when creating a complex regex.
- jonny_eh 11y agoThanks! It's also easier to comment the xeger code.