Re: [pcre-dev] regexp does not work , but does work on other…

Page principale
Supprimer ce message
Auteur: Philip Hazel
Date:  
À: Meir Yanovich
CC: pcre-dev
Sujet: Re: [pcre-dev] regexp does not work , but does work on others
On Sun, 21 Sep 2008, Meir Yanovich wrote:

> char *regex = "<a[^>]+href\s*=\s*[\"']?([^\"'> ]+)";


You have made an elementary mistake. Try

char *regex = "<a[^>]+href\\s*=\\s*[\"']?([^\"'> ]+)";
                          ^    ^
                          ^    ^
                          ^    ^
Philip


--
Philip Hazel