[Haskell-cafe] problem with regex replace with back references

Juan Maiz juanmaiz at gmail.com
Mon May 24 11:08:50 EDT 2010


I'm trying use subRegex to replace using back references just like the docs
says:
http://hackage.haskell.org/packages/archive/regex-compat/0.92/doc/html/Text-Regex.html#v%3AsubRegex

But when i try to replace with \1 i got \SOH and not "e". Can anyone help?

subRegex (mkRegex "e") "hello" "\1"
=> "h\SOHllo"

Thanks in advance


-- 
Juan Maiz Lulkin Flores da Cunha
-------------------------------------------------
=== @ Softa
=== http://mailee.me
=== http://hi.im/joaomilho
-------------------------------------------------
“The most exciting breakthroughs of the 21st century will not occur because
of technology but because of an expanding concept of what it means to be
human” John Naisbitt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100524/4e547e78/attachment.html


More information about the Haskell-Cafe mailing list