Opened 14 years ago
Closed 14 years ago
#2750 closed Bugs (worksforme)
regex backwar looking assertion
| Reported by: | anonymous | Owned by: | John Maddock |
|---|---|---|---|
| Milestone: | To Be Determined | Component: | regex |
| Version: | Boost 1.36.0 | Severity: | Problem |
| Keywords: | Cc: |
Description
The perl expression (?<=.{3,3}).{6,6} passed in to boost regex results in Unmatched [ or [
?<= signifies a backward looking positive assertion so a pattern match should be returning 6 characters starting at offset 4 This works fine in perl. Any idea what part of the pattern is causing the issue?
thanks
Mark
Change History (3)
comment:1 by , 14 years ago
| Component: | None → regex |
|---|
comment:2 by , 14 years ago
| Owner: | changed from to |
|---|
comment:3 by , 14 years ago
| Resolution: | → worksforme |
|---|---|
| Status: | new → closed |
Works for me too, closing this for now, please reopen if you have a test case that demonstrates the issue with Boost-1.38.
John Maddock
Note:
See TracTickets
for help on using tickets.

What compiler? It works for me with Visual Studio 2008 and Boost 1.36.0
#include <boost/regex.hpp> #include <iostream> int main() { boost::regex r("(?<=.{3,3}).{6,6}"); std::cout << boost::regex_search("...122340", r) << std::endl; }