[plt-scheme] addition to pregexp

From: Eli Barzilay (eli at barzilay.org)
Date: Fri Mar 17 15:03:00 EST 2006

On Mar 17, Matthew Flatt wrote:
> I like this feature.
> Instead of introducing a new name, how about generalizing
> `[p]regexp-replace[*]' to accept either a string or a function as
> its last argument?

Another point is that it's probably better if the function takes in a
variable number of arguments -- and it will be fed the matching
substring and then all parenthesized submatches (as with `match').

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.