Thread: URL to Match
View Single Post
Old 11-09-2007, 09:54 AM   #5 (permalink)
Haris
The Frequenter
Prolific Welcomer Upcoming Programmer 
 
Join Date: Sep 2007
Posts: 360
Thanks: 24
Haris is on a distinguished road
Default

Quote:
Originally Posted by bluesaga View Post
As far as i can tell, you are already making "about" optional, if you add brackets around "of", followed by a ? it should have the same effect....

Code:
preg_match('/(of)?\s*?(about)?\s*?\<b\>(.*?)\<\/b\>/',$szGetContents, $aMatches);
I also added a non-greedy space matcher aswell, to take account for the spaces.
Of is not optional and it still doesn't work.

PHP Code:
preg_match('/ of (about)?\s*?<b\>(.*?)\<\/b\>/',$szGetContents$aMatches); 
Full code: http://talkphp.pastebin.com/d55d44b38

Where $this->szURL == www.lost-series.com
Haris is offline  
Reply With Quote