Hi.
I'm newbie to Haskell.
I want to get date, it's type is [[String]].
The problem is that "the string that is used in regular expression pattern" is consumed. ie, disappear.
Here is my code.
------------------------------------------------------------
import Text.Regex
import Control.Applicative
main :: IO()
main = do
myIn <- readFile "Data.dat"
print $ lines <$> intoEachPt myIn
intoEachPt :: String -> [String]
intoEachPt = splitRegex (mkRegex "20[0-9]{13}AH021")
-----------------------------------------------------------
How can I fix this?
Data:
....there is many DIGIT.....201306000300001AH02112361640 9.......
Output:
[[....there is many DIGIT..."],["12361640 9......]....]
I hope:
[[....there is many DIGIT..."],["201306000300001AH02112361640 9......]....]