module Main where import Text.Regex.Posix import Text.RawString.QQ haystack :: String haystack = "My e-mail address is user@example.com" needle :: String needle = [r|\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}|] multiline :: String multiline = [r|
|] main :: IO () main = do print multiline print "" print $ ((haystack =~ needle) :: String)