kevinkhan Posted January 26, 2011 Share Posted January 26, 2011 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"; } Link to comment https://forums.phpfreaks.com/topic/225715-can-somebody-help-me-with-a-regular-expression-please/ Share on other sites More sharing options...
50jkelly Posted January 26, 2011 Share Posted January 26, 2011 Hey, the following expression seemed to work for me on that string: /[a-z]+, [a-z]+/i Link to comment https://forums.phpfreaks.com/topic/225715-can-somebody-help-me-with-a-regular-expression-please/#findComment-1165704 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.