summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/lib/Regex/regex002.hs
blob: 9a87a856187651cd593a1ffff7c77598b761a79b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import Text.Regex.Base
import Text.Regex.Posix((=~),(=~~)) -- or DFA or PCRE or PosixRE
import qualified Data.ByteString.Char8 as B(ByteString,pack)

main = let b :: Bool
           b = ("abaca" =~ "(.)a")
           c :: [MatchArray]
           c = ("abaca" =~ "(.)a")
           d :: Maybe (String,String,String,[String])
           d = ("abaca" =~~ "(.)a")
       in do print b
             print c
             print d