According to regex101, the regex a{10}b should match exactly 10 copies of a. The cod at link misparses this.
Replacing this by the following should do the trick:
minn <- option Nothing $ readMay . U.toString <$> A.takeWhile isDig
comma <- option False (char ',' *> pure True)
maxn <- case comma of
False -> pure Nothing
True -> option Nothing (readMay . U.toString <$> A.takeWhile isDig)
_ <- char '}'
case (minn, comma, maxn) of
(Nothing, _, Nothing) -> mzero
(Just n, True, Nothing) -> return $! atleast n re
(Nothing, True, Just n) -> return $! atmost n re
(Just n, False, Nothing) -> return $! between n n re
(Just m, True, Just n) -> return $! between m n re
According to regex101, the regex
a{10}b
should match exactly 10 copies ofa
. The cod at link misparses this.Replacing this by the following should do the trick: