Closed sjshuck closed 3 years ago
Under the hood, Matchers are always global, but some functions are intended to produce at most one match.
Matcher
Currently some functions accidentally return multiple matches in unintended ways that don't make sense given the types. Consider that
{-# LANGUAGE OverloadedStrings #-} module Main where import Text.Regex.Pcre2 main :: IO () main = do print $ captures "(\\d)(\\d)" "12345"
prints
["12","1","2","34","3","4"]
but should print
["12","1","2"]
This is a bug. Fixing it, and providing better docs, will not cause a major version bump.
Under the hood,
Matcher
s are always global, but some functions are intended to produce at most one match.Currently some functions accidentally return multiple matches in unintended ways that don't make sense given the types. Consider that
prints
but should print