RosettaCodeData/Task/Regular-expressions/Haskell/regular-expressions-2.hs

6 lines
126 B
Haskell
Raw Permalink Normal View History

2013-04-10 23:57:08 -07:00
import Text.Regex
orig = "I am the original string"
result = subRegex (mkRegex "original") orig "modified"
putStrLn $ result