[erlang-questions] re: re:pain (and stripping whitespace from text)

Robert Virding <>
Sun Mar 14 07:35:05 CET 2010


On 14 March 2010 03:45, Jayson Vantuyl <> wrote:
> Also, note that backtracking and recursion can create very undesirable behavior in terms of stack usage and execution time.  This is so problematic that Google has written a special regex library that uses research in automata theory to make it behave better.  See here:
>
> RE2:  http://code.google.com/p/re2/

I did a regexp version in Erlang based on these principles and it is
actually time linear in the size of the input. It is fun to see it zip
through what would be for Perl/PCRE a super backtracking pathological
case in a flash. One day when I get the time to cleanup the code I
will release it.

Robert


More information about the erlang-questions mailing list