When using regex_constants::match_prev_avail, it is defined that
--first is valid, and match_not_bol and match_not_bow should be
ignored. At the moment these flags are not ignored. This fixis that.
ldionne miyuki EricWF mclow.lists
- Group Reviewers
- rGc14ac8043ed1: [FIX][libc++][Regex] Using regex_constants match_prev_avail | match_not_bol |…
Hi @EricWF, thanks for the review.
Indeed there seems to have some other unrelated issue for matching the word boundary \b. Perhaps I wrongly assumed that it should also match line beginning and end.
For example, I would expect all these matches to succeed:
cout << regex_match("a", regex("\ba")) << "\n" << regex_match("a", regex("a\b")) << "\n" << regex_match("a", regex("\ba\b")) << "\n" << regex_match("a", regex("a")) << "\n";
But what I get is:
0 0 0 1
So it is unrelated in how match_not_bow is ignored when using match_prev_avail. I would rather open a defect for that apart.
This seems to have broken the ASAN bot. Could you please take a quick look?
Also pasted at https://gist.github.com/ldionne/b85d28805bdf1550b0b59a96146f4b81 cause I don't know when the build bot logs go away.