[eeps] EEP 9

Mats Cronqvist masse@REDACTED
Wed Mar 5 10:21:31 CET 2008


Bjorn Gustavsson wrote:
> Mats Cronqvist <masse@REDACTED> writes:
>   
>>   i would prefer a regexp implementation that avoids PCRE. i think Russ 
>> Cox argues convincingly that PCRE is a mess.
>>     
>
> So which regexp implementation would you suggest?
>   
  i'll backpedal a bit here. what i really think should be avoided is 
backtracking. quoting from Cox (http://swtch.com/~rsc/regexp/regexp1.html);
  "Regular expression matching can be simple and fast, using finite 
automata-based techniques that have been known for decades. In contrast, 
Perl, PCRE, Python, Ruby, Java, and many other languages have regular 
expression implementations based on recursive backtracking that are 
simple but can be excruciatingly slow."

  as for alternative implementations, there's a whole bunch here;

http://swtch.com/~rsc/regexp/

  Rob Pike's plan9-lib would probably be my choice. http://swtch.com/plan9port/unix/man/regexp93.html


  mats




More information about the eeps mailing list