Hi all,

I created this regular expression

$search = preg_match_all("~ HYPERLINK\s(\".+\"){1}~",$text,$matches);


to match something like :
HYPERLINK "file:///C:\\Documents%20and%20Settings\\omar\\Local%20Settings\\Temp\\resume.htm"

It works fine , but the problem is that it sometimes matches the following :

HYPERLINK "file:///C:\\Documents%20and%20Settings\\omar\\Local%20Settings\\Temp\\resume.htm" \l "con_firstname_#con_firstname_" Ahmed  HYPERLINK "file:///C:\\Documents%20and%20Settings\\omar\\Local%20Settings\\Temp\\resume.htm" \l "con_middlename_#con_middlename_"


All this text is being matched as one match , I want the first part of it until the first double quotation is matched , and the second one to be a second match ..

I think the problem is at that part : (\".+\") which means any double quotes followed by anything followed by double quotes, I think I must say any double quotes followed by anything (But not double quotes ) followed by double quotes