The true power of regular expression
nikic.github.io
The true power of regular expression
1–10 of 20 posts
Re: The true power of regular expression
#2That's why we call those derivatives "Franken-xpressions". They can take exponential time in the worst case. See "Regular Expression Matching Can Be Simple And Fast (but is slow in Java, Perl, PHP, Python, Ruby, ...)" (http://swtch.com/~rsc/regexp/regexp1.html).
The additional power of Franken-xpressions comes at a cost.
For general purpose parsing, I suggest using a parser combinator library.
Re: The true power of regular expression
#3Re: The true power of regular expression
#4Re: The true power of regular expression
#5So...on the off-chance that the default SDKs for Java / .Net do not implement this natively, anyone have a link to some (preferably free) libraries that do make use of this implementation?
Re: The true power of regular expression
#6Re: The true power of regular expression
#7The main point against using regular expression for me is that it takes developers that are new to the code (or yourself in a few months) so long to figure out what is happening there, not that they are not powerful. The fact that there is no way to debug them in most environments and no comments does not help.
Re: The true power of regular expression
#8The main point against using regular expression for me is that it takes developers that are new to the code (or yourself in a few months) so long to figure out what is happening there, not that they are not powerful. The fact that there is no way to debug them in most environments and no comments does not help.
Re: The true power of regular expression
#9Re: The true power of regular expression
#10> But when programmers talk about “regular expressions” they aren’t talking about formal grammars. They are talking about the regular expression derivative which their language implements. And those regex implementations are only very slightly related to the original notion of regularity. That's why we call those derivatives "Franken-xpressions". They can take exponential time in the worst case. See "Regular Expressi…