
Wow, what a simple, silly mistake. Once corrected, it works fine.
Thanks for the suggestions on case insensitivity and spacing, too.
Now I'm off to get iterators working!
Thanks,
Chris
On 5/22/06, John Maddock
Christopher Hart wrote:
I've run into a problem where I'm getting an "Invalid content of repeat range" when attempting to match a string using greediness and capture operators. I'm using the following function (basically taken from the "print captures" example in the regex docs):
find_matches(html, "
<a href=(.*?)>");
Your arguments are the wrong way around there, the expression works just fine for me otherwise.
The pattern I'm trying to match is working in Perl program (e.g. if ($html =~ m|<p class="priceBest"><a href=(.*?)>|gs) {...} ), so it seems like the pattern should be syntactically correct. I'm building on Mac OS X 10.4 (Intel) with Boost 1.33.1.
You might want to make the expression case insensitive in case the data has <P> rather than <p>, and insert a \s* in between the <p> and the <a> just in case....
Just a couple of random thoughts,
John.
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users