aboutsummaryrefslogtreecommitdiff
path: root/tests/bkpregex/regex-example/Main.hs
blob: 76d29742ef33c1abe3ecbe4d2ae9750367cfa243 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
{-# LANGUAGE OverloadedStrings #-}
module Main where

import Regex.Types
import qualified Regex.String
import qualified Regex.ByteString

nocs = Rep (Alt (Sym 'a') (Sym 'b'))
onec = Seq nocs (Sym 'c')
evencs = Seq (Rep (Seq onec onec)) nocs
main = print (Regex.String.accept evencs "acc") >>
       print (Regex.ByteString.accept evencs "acc")