All I can say is that I agree with Richard but expand more on it the EEP.<div><br></div><div>One quick comment is that I wonder if not part of the problem with PCRE and Perl regular expressions is that in one respect they are integrated into Perl and contain features to interact with the rest of Perl. If I remember correctly, for example, you can set Perl variables directly from the RE. Is this what became the named subexprs in PCRE?<br>
<div><br></div><div>Robert <br><br><div class="gmail_quote">2008/6/16 Kenneth Lundin <<a href="mailto:kenneth.lundin@gmail.com">kenneth.lundin@gmail.com</a>>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<br>
<br>
Regarding the new "experimental" builtin regexp functions in the re<br>
module our intention is<br>
to provide a fully working implementation where we want feedback on<br>
the API functions and also other feedback.<br>
With "experimental" we don't mean very buggy or low quality but rather<br>
that the API's are not stabilized yet and that there<br>
are a few optimizations more to do.<br>
<br>
Our intention with releasing this regexp implementation before the<br>
API's are 100% settled is that we believe<br>
we can get more and better comments if people actuall can try<br>
themselves to use the functions.<br>
<br>
We would appreciate if we get the comments in relation to the<br>
EEP 11 Built in regular expressions in Erlang<br>
<a href="http://www.erlang.org/eeps/eep-0011.html" target="_blank">http://www.erlang.org/eeps/eep-0011.html</a> which is especially written<br>
for this purpose.<br>
<br>
/Regards Kenneth Lundin Erlang/OTP team at Ericsson<br>
<br>
<br>
On Mon, Jun 16, 2008 at 2:03 AM, Richard A. O'Keefe <<a href="mailto:ok@cs.otago.ac.nz">ok@cs.otago.ac.nz</a>> wrote:<br>
> The README for OTP R12B-3 has says, amongst good stuff:<br>
> OTP-7181 An experimental module "re" is added to the emulator<br>
> which interfacesa publicly available regular expression library<br>
> for Perl-like regular expressions (PCRE). The interface is purely<br>
> experimental and *will* be subject to change.<br>
> One way I hope that it will change is that it won't be PCRE.<br>
> There are two major problems with Perl regular expressions:<br>
> (A) the design is so bloated that it is extraordinarily hard for<br>
> people to master them. This is in marked contrast to the<br>
> wise restraint of POSIX "Extended Regular Expressions".<br>
> (B) the design is so bloated that they completely miss the whole<br>
> point of using regular expressions in the first place, which<br>
> is LINEAR-TIME MATCHING. True, there are some cases where<br>
> Perl (and PCRE) take exponential time when they could take<br>
> linear time, but I'm not talking about accidents of the<br>
> implementation. The design-by-elephantiasis approach has<br>
> resulted in a matching language which is provably intractable.<br>
><br>
> One of the reasons for (A) is that it is very hard for anyone not<br>
> intimately familiar with the Perl or PCRE implementation to tell<br>
> which patterns will be matched efficiently and which will not.<br>
> There are free implementations of Posix EREs out there that do<br>
> guarantee matching linear in the amount of data matched, so any<br>
> RE library for Erlang built on top of C should use such a library<br>
> whenever possible, falling back on PCRE only when absolutely<br>
> necessary.<br>
> This has been discussed at length in this mailing list before.<br>
><br>
> _______________________________________________<br>
> erlang-questions mailing list<br>
> <a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
> <a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
><br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://www.erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://www.erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div><br></div></div>