Can somebody help me to convert php regex to nodejs. My PHP Regex code
preg_match_all('#bhttps?://[^,s()<>]+(?:([wd]+)|([^,[:punct:]s]|/))#', $script, $match);
I’m new to nodejs please help me to convert this.
Can somebody help me to convert php regex to nodejs. My PHP Regex code
preg_match_all('#bhttps?://[^,s()<>]+(?:([wd]+)|([^,[:punct:]s]|/))#', $script, $match);
I’m new to nodejs please help me to convert this.
4
Answers
Here’s the equivalent Node.js regex
Demo & Explanation: https://regex101.com/r/Y2vlwe/1
I assume you’re trying to check for a valid url. easies thing in javascript is to do this: