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! Quote 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 " Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.