
11 Dec
2013
11 Dec
'13
6:48 p.m.
What I want to to there is to get i.e. "word," or "word!" etc. and arrive at "word". I understand that escapeRe may do this.
Why not do it the easy way? import Char(isAlpha) keep_letters = filter isAlphs Then keep_letters "word," = keep_letters "(w)ord" = "word". If you are content to work with Unicode, you get use getLine :: IO ByteString and splitWith :: (Word8 -> Bool) -> ByteString -> [ByteString] with predicate not . isAlpha . chr . fromIntegral and then filter out the empty ByteStrings