[Haskell-cafe] a problem about Regex in Real World Haskell

Daniel Fischer daniel.is.fischer at web.de
Sat Nov 13 08:46:09 EST 2010


On Saturday 13 November 2010 03:26:46, wolf python london wrote:
> hi ,folks ,
>
> I'm a newbie of haskell  and learn haskell using the textbook "Real
> World Haskell".
>
> in the page 201,
>
> ghci> "good food" =~ ".ood" :: [String]

Should be

"good food" =~ ".ood" :: [[String]]

I think. I don't know if it was an error when the book was written or the 
regex libs changed.

>
> my output is here https://gist.github.com/675024
> it doesn't match what the textbook gives . And I found the ebook of
> Real World Haskell doesn't match it ,either(just like my output ) .
> I was wondering How I can fix this problem about Regex.
>
> much thanks ~



More information about the Haskell-Cafe mailing list