BREs recently became prematurely sensitive to the branching
operator, which outright broke expressions that used it instead of
failing silently. Test that \| is matching a literal | for the time
being.
Details
Details
- Reviewers
emaste cem ngie - Commits
- rS321315: Add regression test for recent regex(3) breakage
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Are \(\) not matching literal parentheses? I guess I'm confused why the 4th column is b|c (and why the first is b). (Also, I'm unfamiliar with this input format and just guessing at what things mean.)
Comment Actions
Correct- In BRE's, \( and \) specify a matching group as () do in EREs.
The first column 'b' means "try this as a BRE only", the second column is the string to try matching it against, the third is the section of the string that the expression matches (all of it, in this case), and the fourth is a comma-separated list of what the subexpressions (matching groups) should match