carrotcake1029 Posted December 19, 2008 Share Posted December 19, 2008 I'm not too good with regular expressions, but I am trying to learn. This regex is to extract urls from html. It skips over urls inside of tags. Can anyone tell me why this is grabbing a character before the url. '/[^="]http:\/\/[^ \n\r]+(?=[\<])/' For instance, this is occurring atm. The file contains this string -->http://www.google.com<br /> and it is returning >http://www.google.com Any help is greatly appreciated! Link to comment https://forums.phpfreaks.com/topic/137659-solved-grabbing-1-too-many-characters/ Share on other sites More sharing options...
.josh Posted December 19, 2008 Share Posted December 19, 2008 [^="] that is causing it to grab 1 char that is not a = or " Link to comment https://forums.phpfreaks.com/topic/137659-solved-grabbing-1-too-many-characters/#findComment-719660 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.