izuzak / noam

JavaScript library for working with automata and grammars for regular and context-free languages
http://ivanzuzak.info/noam/
Other
212 stars 33 forks source link

How to use this for real (programming) regexes? #3

Open AJMansfield opened 10 years ago

AJMansfield commented 10 years ago

The language that this library parses uses a different set of symbols as the operators than the type commonly used by regex libraries in most programming languages: using + instead of | for alternation, and no + (one or more), {n} (exactly n copies), ? (optional), or other operators (although they can all be expanded into expressions involving only the alternation and kleene operators). How can I use this library with the more common regex dialect instead?

izuzak commented 10 years ago

@AJMansfield care to explain what you're having problems with?

PlNG commented 10 years ago

I think he was most likely expecting the Perl Compatible Regular Expressions language set, but your usage of "Kleene operator" suggests a different set.