[erlang-questions] Use of regular expressions

Robert Virding rvirding@REDACTED
Thu Oct 30 03:13:25 CET 2008


Yes, that is/will be the new one. It is still experimental and you can get a
better idea of what is coming by looking at the EEP for it:

http://www.erlang.org/eeps/eep-0011.html

Robert

2008/10/30 Edwin Fine <erlang-questions_efine@REDACTED>

> I thought the re module was supposed to be the new one (
> http://www.erlang.org/doc/man/re.html), in experimental status but
> definitely in the current Erlang release, and regexp is the old one that's
> being replaced. Is there another new one coming that's different from re?
>
> Regards
> Edwin Fine
>
>
> On Wed, Oct 29, 2008 at 8:34 PM, David Mitchell <monch1962@REDACTED>wrote:
>
>> Do you have a pointer to info about the new Erlang regular expression
>> module?  I've heard bits and pieces about it, but haven't found any
>> solid information other than "it's coming, and it'll be better than
>> the current one".
>>
>> A large part of what I do is message handling, which involves tearing
>> apart incoming messages (which might be XML, or binary data, or MQ
>> data, or Oracle SQL*Net client requests, or ...), examining the
>> content, then either routing the message to somewhere else, or
>> extracting content from the incoming message and using it to build a
>> suitable response.  Regex is the way to go for tearing apart this type
>> of data (well, if the incoming data is XML, then I'll parse out the
>> individual field/s I'm interested in first using an XML parser, then
>> often use regex to extract the info from within individual fields);
>> I've tried using Erlang's pattern matching to achieve the same result,
>> but the code required to do so was just too clunky and difficult to
>> maintain.
>>
>> At the moment, Perl 5.10 is what I'm using; as of 5.10, the thread
>> handling is much improved, and Perl's regex handling is basically as
>> good as it gets.  The limitation is that Perl has no easy way to scale
>> load across multiple machines, which is an ongoing problem for us.
>> There's also the broader problem of it being a challenge to write Perl
>> code that is maintainable, long-term.
>>
>> I'd really like to be doing this in Erlang, for any number of reasons.
>>  A more powerful regex module would be a huge help in making this
>> happen.
>>
>> Regards
>>
>> Dave M.
>>
>> 2008/10/30 Robert Virding <rvirding@REDACTED>:
>> > As the new regular expression module is coming soon and after all the
>> > discussions on the net of how slow the old module was/is I was just
>> > wondering how they are used in "real life"? What type of searches are
>> > typically done on what type of data? Is there a typical usage?
>> >
>> > For example do people use regexps to pull apart a small string into
>> > components, like an URL? Or search for a match in a 100Mb data file? Or
>> > what? Or all of the above?
>> >
>> > I am just curious as to how they are used.
>> >
>> > Robert
>> >
>> >
>> > _______________________________________________
>> > erlang-questions mailing list
>> > erlang-questions@REDACTED
>> > http://www.erlang.org/mailman/listinfo/erlang-questions
>> >
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081030/1381ced0/attachment.htm>


More information about the erlang-questions mailing list