[Haskell-beginners] subRegex https? with anchor href tags

Shakthi Kannan shakthimaan at gmail.com
Sat Nov 12 16:10:58 CET 2011


Hi,

--- On Sat, Nov 12, 2011 at 8:20 PM, Daniel Fischer
<daniel.is.fischer at googlemail.com> wrote:
| Prelude Text.Regex> subRegex (mkRegex "https?[^[:space:]]+") "The best is
| http://haskell.org\n" "<a href=\"\\0\">there</a>"
| "The best is <a href=\"http://haskell.org\">there</a>\n"
\--

Is there any way we can escape the " within <a href></a>, and not get
the \" in the output? I am producing HTML in the output, and the \"
doesn't work with the anchor tag. Expected output is:

  "The best is <a href="http://haskell.org">there</a>\n"

Thanks for your prompt help!

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com



More information about the Beginners mailing list