From: David Brownell (brownell_at_[hidden])
Date: 2001-08-24 15:19:00
This is most likely my error, but I am trying to do the following:
1) A user types in a search string
2) I add the prefix ".*" and suffix ".*" to the string
When I call regex_match, anything and everything matches, regardless of what
the user typed. I would like the following results, and am guessing I am
not using the correct regular expression syntax:
a) User types "Test"
b) Internally, I create the regular expression ".*Test.*"
Results (String : result)
"A Test" : true
"Testing 123" : false
"foo" : false
Using regex, regex_match is returning true for "foo". I tried changing the
prefix to ".*?" to ensure a non-greedy search, but the results were the
Thanks in advance for your help!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk