Wed Jun 3 12:01:55 CEST 2009
Robert Virding <> writes:
> 2009/6/3 mats cronqvist <>
>> "Richard O'Keefe" <> writes:
>> > That pain level is there for a good reason: if the Erlang string
>> > syntax is giving you that much of a headache, it's because STRINGS ARE
>> > WRONG and you should almost certainly be using trees instead.
>> Alas, re wants strings, and there's not much I can do about that.
> Not quite true. The *underlying implementation* wants the regexp as a string
> but this does not mean that the user has to supply it as a string. You could
> very well allow the regexp as an AST (as well as?) and then internally
> convert it to a string.
Scheez. The re module, as it exists in R13, wants strings. Full stop.
You could of course write a different front end to pcre, or a pure
erlang regexp module, or an infinite number of other fine products for
which this isn't true, but that really has no bearing on this
More information about the erlang-questions