aboutsummaryrefslogtreecommitdiffstats
path: root/src/Lib.hs
diff options
context:
space:
mode:
authorTeddy Wing2017-07-30 02:22:23 +0200
committerTeddy Wing2017-07-30 02:22:23 +0200
commit08d566f3a28370d2f63aa81ef27b405d59f6ddc0 (patch)
tree57b36098ecc7ab97fe6f19205f1184b2439b1350 /src/Lib.hs
parent75ac7b18a009ffe7a77a17a61d95c01395f36b44 (diff)
downloadsorbot-08d566f3a28370d2f63aa81ef27b405d59f6ddc0.tar.bz2
Experiment with 'regex-tdfa'
* Add the 'regex-tdfa' library for RegEx handling * Experiment with matching a Git SHA
Diffstat (limited to 'src/Lib.hs')
-rw-r--r--src/Lib.hs10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/Lib.hs b/src/Lib.hs
index d36ff27..3bc9579 100644
--- a/src/Lib.hs
+++ b/src/Lib.hs
@@ -2,5 +2,13 @@ module Lib
( someFunc
) where
+import Text.Regex.TDFA
+
someFunc :: IO ()
-someFunc = putStrLn "someFunc"
+someFunc
+ | rex == True = putStrLn "Match!!"
+ | otherwise = putStrLn "No match"
+
+
+rex :: Bool
+rex = "75ac7b18a009ffe7a77a17a61d95c01395f36b44" =~ "^[0-9a-f]{5,40}$"