[erlang-questions] Improved regexp.erl

Fredrik Thulin <>
Thu Oct 26 08:39:53 CEST 2006

Robert Virding <> wrote:
> What requirements do people have?

In YXA, we still have a modified regexp.erl (modified by Magnus Ahltorp 
a long long time ago) that can return a list of all groups in a match. 
Example :

  1> group_regexp:groups("foobar", "foo(.+)").

This we then use to perform substitutions, so that in the end the 
following is possible :

  3> L.
  4> util:regexp_rewrite("000319876543", L).
  5> util:regexp_rewrite("00162000", L).

Maybe there is a way to do it with the current regexp.erl (the one in 
R11B-1 I mean), in which case I would like to know about it =) but if 
there isn't then that is a requirement for me.

Many thanks


More information about the erlang-questions mailing list