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

Top Page
Delete this message
Author: Philip Hazel
Date:  
To: Meir Yanovich
CC: pcre-dev
Subject: 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