[erlang-questions] Use of regular expressions
Thu Oct 30 02:04:31 CET 2008
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?
On Wed, Oct 29, 2008 at 8:34 PM, David Mitchell <> 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
> 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
> Dave M.
> 2008/10/30 Robert Virding <>:
> > 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
> > http://www.erlang.org/mailman/listinfo/erlang-questions
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions