Text.Regex.Posix's =~ operator cannot get the return value in some patterns.
For example,
> import Text.Regex.Posix
> "y2019m10d08" =~ "y([0-9]{4})?m([0-9]{1,2})?d([0-9]{1,2})?" :: Bool
True
> "y2019m10d08" =~ "y([0-9]{4})?m([0-9]{1,2})?d([0-9]{1,2})?" :: Int
1
> "y2019m10d08" =~ "y([0-9]{4})?m([0-9]{1,2})?d([0-9]{1,2})?" :: [[String]]
What I expected
[["y2019m10d08","2019","10","08"]]
But after the last entry, the calculation doesn't seem to end.
Why?
My environment:
- Windows 10
- GHC 8.6.5
- regex-base-0.93.2
- regex-posix-0.95.2