Jump to content

Can somebody help me with a regular expression please


kevinkhan

Recommended Posts

Hi guys,

 

still trying to learn regular expressions, can somebody show me something that i can use to match "Bandon, Ireland" in the following string

 


$page = Lives in \u003ca href=\"http:\/\/www.facebook.com\/pages\/Bandon-Ireland\/110700692283617\" data-hovercard=\"\/ajax\/hovercard\/page.php?id=110700692283617\">Bandon, Ireland\u003c\/a>

preg_match('||', $page, $match);
if($match && count($match)>0) {
	echo "Match Found";
}
else {
echo "No Match Found";
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.