[erlang-questions] Regular expressons again, an improved regexp module

Robert Virding robert.virding@REDACTED
Mon Sep 11 00:42:36 CEST 2006


After the discussions earlier on about the speed, or lack of, of the 
regexp module I have added a regular expression compiler.

There is a new function regexp:compile(RegExp) which takes a regulare 
expression parses and compiles it and returns it in a form which can be 
used instead of regular expressions in all the matching functions. In 
the same way that the return from regexp:parse can.

The new module is a drop-in replacement to the old with the exception of 
the new function. One caveat it is not yet possible to compile anchored 
expressions.

I would appreciate it if someone could do some serious testing and see 
if there is a significant improvement with real regexps. I have just 
tested that it works.

Another question is what people would like to apply the regexps on, 
lists or binaries? The module now works on lists but it would not be 
difficult to make it work on binaries as well.

Robert
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: regexp.erl
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20060911/39fe4841/attachment.ksh>


More information about the erlang-questions mailing list