The Little Guy Posted May 4, 2011 Share Posted May 4, 2011 I have this regex, and I can not figure out how to get all the href tags but NOT the ones that are javascript href tags, so basically I want to ignore anything that starts with: javascript: Here is my current expression: /\<a.+?href=(\"|')(.+?)(\"|')/i I can not seem to figure it out. Any suggestions? Quote Link to comment https://forums.phpfreaks.com/topic/235480-ignore-anything-that-starts-with-javascript/ Share on other sites More sharing options...
gizmola Posted May 4, 2011 Share Posted May 4, 2011 Give this a try: /\ Quote Link to comment https://forums.phpfreaks.com/topic/235480-ignore-anything-that-starts-with-javascript/#findComment-1210265 Share on other sites More sharing options...
The Little Guy Posted May 4, 2011 Author Share Posted May 4, 2011 Well, that looks like it worked! Thanks man! Quote Link to comment https://forums.phpfreaks.com/topic/235480-ignore-anything-that-starts-with-javascript/#findComment-1210573 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.