Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
|
|
@ -1,7 +1,2 @@
|
|||
import Text.Regex
|
||||
|
||||
str = "I am a string"
|
||||
|
||||
case matchRegex (mkRegex ".*string$") str of
|
||||
Just _ -> putStrLn $ "ends with 'string'"
|
||||
Nothing -> return ()
|
||||
ghci> import Text.Regex.TDFA
|
||||
ghci> "I am a string" =~ ".*string$" :: Bool
|
||||
|
|
|
|||
|
|
@ -1,5 +1,3 @@
|
|||
import Text.Regex
|
||||
|
||||
orig = "I am the original string"
|
||||
result = subRegex (mkRegex "original") orig "modified"
|
||||
putStrLn $ result
|
||||
ghci> import Text.Regex.TDFA
|
||||
ghci> compiled = makeRegex ".*string$" :: Regex
|
||||
ghci> match compiled "I am a string" :: Bool
|
||||
|
|
|
|||
|
|
@ -0,0 +1,7 @@
|
|||
import Text.Regex
|
||||
|
||||
str = "I am a string"
|
||||
|
||||
case matchRegex (mkRegex ".*string$") str of
|
||||
Just _ -> putStrLn $ "ends with 'string'"
|
||||
Nothing -> return ()
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import Text.Regex
|
||||
|
||||
orig = "I am the original string"
|
||||
result = subRegex (mkRegex "original") orig "modified"
|
||||
putStrLn $ result
|
||||
Loading…
Add table
Add a link
Reference in a new issue