-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain.hs
More file actions
25 lines (21 loc) · 724 Bytes
/
Main.hs
File metadata and controls
25 lines (21 loc) · 724 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-- Advanced Programming, Final Project
-- by Greg Terrono gterrono, Aaditya R. Shirodkar aadis
import Regex
import Test.HUnit
main :: IO ()
main = do
runTestTT allTests
putStrLn $ "Use any of the following functions:"
putStrLn $ "returnBool <RegEx> <String>"
putStrLn $ "returnMatches <RegEx> <String>"
putStrLn $ "returnExtractions <RegEx> <String>"
return ()
-- returnBool "ab*c+(d|e)?." "abbbcde"
-- returnBool "ab*c+(d|e)?." "abbbde"
-- returnBool "ab*c+(d|e)?." "abbbcdf"
-- returnBool "ab*c+(d|e)?." "acdx"
-- returnMatches "((a|b)|c)*" "a"
-- returnExtractions "((a|b)|c)" "a"
-- returnMatches "^ab$" "ab"
-- returnMatches "a**" "a"
-- returnExtractions "^(a.)(c)" "abc"