Re : RE : Re: compilation trouble with boost::regex
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
hallouina-ml@yahoo.fr wrote:
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?
Not quite: but please see the docs for the complete explanation and examples.
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.
See this example: http://www.boost.org/libs/regex/example/snippets/regex_token_iterator_eg_2.c... Which does exactly that. HTH, John.
Hi, I trying to use boost on a windows project. Reading the web-page: http://www.boost.org/more/getting_started/windows.html I saw the installation using pre-compiled binaries from Boost Consulting. I installed them without any problem. Meanwhile, I get problems when compiling a project using Visual Studio 2005. After writing the header and libraries path to project I get the error (while compiling the example in the same page) fatal error LNK1104: cannot open file 'libboost_regex-vc80-mt-gd-1_34_1.lib' I check the file and it doesn't exist on lib folder. What am I missing? Did anyone had the same problem. Best regards Pedro Sousa --- Pedro Sousa Applied Robotics and Intelligent Systems researcher http://www.isr.uc.pt/~pasousa/ Coimbra - Portugal
participants (3)
-
hallouina-ml@yahoo.fr
-
John Maddock
-
Pedro Sousa