You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a requirement in Regex::count_matches(). Exceptions are currently thrown if the pattern to count contains duplicate numbers and those parentheses are not balanced. That means that all expressions should have balanced parentheses even if they contain variables, even if they are contained in variables.
I don't think it's worth to go through the pain of relaxing this requirement.
The text was updated successfully, but these errors were encountered:
aercolino
changed the title
[Regex] Document the fact that expressions must have balanced parenthesis.
[Regex] Document the fact that expressions must have balanced parentheses.
Nov 24, 2014
Notice that the requirement for balanced parenthesis is limited to duplicate numbers subexpressions (which are alternations). In fact there is a new test (count_matches_allows_to_count_broken_expressions) which confirms that unbalanced parenthesis are supported in other places. But again, this is something to handle with care.
It is a requirement in Regex::count_matches(). Exceptions are currently thrown if the pattern to count contains duplicate numbers and those parentheses are not balanced. That means that all expressions should have balanced parentheses even if they contain variables, even if they are contained in variables.
I don't think it's worth to go through the pain of relaxing this requirement.
The text was updated successfully, but these errors were encountered: