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"; } Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.