[Haskell-cafe] a problem about Regex in Real World Haskell
wolf python london
lyh19901223 at gmail.com
Sat Nov 13 09:33:59 EST 2010
On 13 November 2010 21:46, Daniel Fischer <daniel.is.fischer at web.de> wrote:
> 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.
I think so . as
ghci> pack "good food" =~ ".ood" ::[ByteString]
doesn't work ,either, but
ghci>pack "good food" =~ ".ood"::[[ByteString]]
>> 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 ~
wolf python london(WPL)
Do as you soul should do !
More information about the Haskell-Cafe