shortysbest Posted August 4, 2011 Share Posted August 4, 2011 preg_match('`((http)+(s)?:(//)|(www\.))((\w|\.|\-|_)+)(/)?(\S+)?`i', $string, $found_url) Link to comment https://forums.phpfreaks.com/topic/243832-this-php-regexp-works-in-php-but-cant-get-it-to-work-in-javascript/ Share on other sites More sharing options...
TeNDoLLA Posted August 4, 2011 Share Posted August 4, 2011 What have you tried in JS then? Also this is probably wrong section if you need JS help. Link to comment https://forums.phpfreaks.com/topic/243832-this-php-regexp-works-in-php-but-cant-get-it-to-work-in-javascript/#findComment-1251967 Share on other sites More sharing options...
shortysbest Posted August 4, 2011 Author Share Posted August 4, 2011 Actually, oddly enough I just tried it in javascript again, and it worked this timeĀ (Only posted here because the javascript thread doesn't get much traffic, and figured anyone good with regexp could do both) Link to comment https://forums.phpfreaks.com/topic/243832-this-php-regexp-works-in-php-but-cant-get-it-to-work-in-javascript/#findComment-1251969 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.