[Haskell-cafe] Regex string replacement

José Romildo Malaquias j.romildo at gmail.com
Sat Aug 18 14:18:47 CEST 2012


Hello.

I am looking for a substring replacement based on Perl like regular
expressions that would let me use part of the original string in the
replacement string. Something like:

   reReplace "name is (.*)\\." "hi \1!" "my name is john."

which would result in

   "hy john!"

Any help?

Romildo



More information about the Haskell-Cafe mailing list