[erlang-questions] Erlang/OTP R12B-3 has been released

Richard A. O'Keefe <>
Mon Jun 16 02:03:15 CEST 2008

The README for OTP R12B-3 has says, amongst good stuff:
OTP-7181 An experimental module "re" is added to the emulator
   which interfacesa publicly available regular expression library
   for Perl-like regular expressions (PCRE). The interface is purely
   experimental and *will* be subject to change.
One way I hope that it will change is that it won't be PCRE.
There are two major problems with Perl regular expressions:
(A) the design is so bloated that it is extraordinarily hard for
     people to master them.  This is in marked contrast to the
     wise restraint of POSIX "Extended Regular Expressions".
(B) the design is so bloated that they completely miss the whole
     point of using regular expressions in the first place, which
     is LINEAR-TIME MATCHING.  True, there are some cases where
     Perl (and PCRE) take exponential time when they could take
     linear time, but I'm not talking about accidents of the
     implementation.  The design-by-elephantiasis approach has
     resulted in a matching language which is provably intractable.

One of the reasons for (A) is that it is very hard for anyone not
intimately familiar with the Perl or PCRE implementation to tell
which patterns will be matched efficiently and which will not.
There are free implementations of Posix EREs out there that do
guarantee matching linear in the amount of data matched, so any
RE library for Erlang built on top of C should use such a library
whenever possible, falling back on PCRE only when absolutely
This has been discussed at length in this mailing list before.

More information about the erlang-questions mailing list