Opened 11 years ago
Closed 11 years ago
#5852 closed Bugs (invalid)
boost::xpressive::sregex::compile
Reported by: | anonymous | Owned by: | Eric Niebler |
---|---|---|---|
Milestone: | Boost 1.48.0 | Component: | xpressive |
Version: | Boost 1.47.0 | Severity: | Problem |
Keywords: | smatch compile | Cc: | ivandiprima@… |
Description
Hi,
please run very simple program attached and see why it doesnt match result in one instance while it correctly does in the other instance (commented out).
Thanks Ivan
Attachments (2)
Change History (3)
by , 11 years ago
by , 11 years ago
comment:1 by , 11 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
You are using the wrong algorithm.
regex_match
only succeeds if it consumes the whole input, which the first pattern does.regex_search
will find the pattern anywhere in the input string. You should useregex_search
. (And read the docs. ;-))