Thanks for your answer, I think it's clear :
So you mean that BOOST_REGEX_MATCH_EXTRA is made for matching for
exemple somethingsomething in the string :
"blablablasomethingsomethingblablabla".
Is it right?
In fact I want extract all the link from a webpage. I want to used the
regex because this is faster than doing a DOM tree from the webpage. So
I want doing the perl equivalent of
@matches =~ m/.*(regex_of_the_url_with_href).*/gs
g flag because I want extract all of the url.
s flag beacause I want that "." match "\n" too.
----- Message d'origine ----
De : John Maddock
I need Perl style capture like m/(some_regex)/g
because I need the g flag (to capture more than one time my regex). So if I understand the documentation (as you can see, my english is far from beeing perfect...) ; if I want to use the g flag equivalent in my regex, I need to enable this feature.
Oh no you don't :-) The Perl /g flag is something different again: the equivalent functionality in Boost.Regex is regex_iterator, which enumerates one at a time over all the possible matches in a string. Repeated captures come into play when you have say an expression "(something)+" matched against "somethingsomething" in which case in Perl: $0 = "somethingsomething" $1 = "something" With BOOST_REGEX_MATCH_EXTRA enabled then $1 contains a list of all the "something"'s matched by the first capturing group within a single overall match. I hope this is clear, Regards, John Maddock. _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users _____________________________________________________________________________ Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail