[Haskell-cafe] Regex string replacement

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


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?


More information about the Haskell-Cafe mailing list