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

Páxina inicial
Borrar esta mensaxe
Autor: Philip Hazel
Data:  
Para: Meir Yanovich
CC: pcre-dev
Asunto: 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