| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|Regex - extracting: intitle: intext: etc|
I need some help extracting the text for intitle: intext: search functions.
$q = 'site:webmasterworld.com intitle:google adsense intext:contextual advertising';
Text to be extracted:
$val[intitle] = 'google adsense';
$val[intext] = 'contextual advertising';
I've tried lots of variants similar to:
$match[intitle] = '/(^¦ )intitle:?(.+)( intitle:¦ intext:)/i';
preg_match($match[intitle], $q, $varInTitle);
But I'm crap at regex... :( nothing is working the way I want.
Can anyone help?
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved