fert Posted February 15, 2007 Share Posted February 15, 2007 i have this code preg_match_all("/<a href=\"(.*?)\">/",$result,$matches); it's suppose to match things like: <a href="whatever.site">link[/url] but it doesn't and i can't see why Link to comment https://forums.phpfreaks.com/topic/38567-need-help-matching-links/ Share on other sites More sharing options...
effigy Posted February 15, 2007 Share Posted February 15, 2007 It does: <pre> <?php $result = '<a href="http://www.phpfreaks.com">'; preg_match_all("/<a href=\"(.*?)\">/", $result, $matches); echo htmlspecialchars($matches[0][0]); ?> </pre> Do the a tags contain other attributes? Link to comment https://forums.phpfreaks.com/topic/38567-need-help-matching-links/#findComment-185432 Share on other sites More sharing options...
fert Posted February 16, 2007 Author Share Posted February 16, 2007 nope Link to comment https://forums.phpfreaks.com/topic/38567-need-help-matching-links/#findComment-185942 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.