[Haskell-cafe] Regex multiple matches

Omari Norman omari at smileystation.com
Tue Jul 20 11:55:58 EDT 2010


> How do I use Text.Regex.PCRE to get information on multiple matches? For
> instance, in ghci I get this error message:
> 
> Prelude Text.Regex.PCRE> "foo" =~ "o" :: [(Int,Int)]

Solved; do

getAllMatches ("foo" =~ "o") :: [(Int, Int)]



More information about the Haskell-Cafe mailing list