Python regex pattern
pattern = r'^(?:(.*?) )?(https?:\/\/\S+) (.*)$|^(?:(.*?) )?(SERVER_UPLOAD_FILE_PATH____\S+) ?(.*)$'
how to convert this same regex into js regex ?
Any Help would be Appreciated thanks in Advance
I suggest you to read about RegExp validation before implementing https://www.w3resource.com/javascript/form/email-validation.php
and then try below code
var pattern = /^(?:(.*?) )?(https?:\/\/\S+) (.*)$|^(?:(.*?) )?(SERVER_UPLOAD_FILE_PATH____\S+) ?(.*)$/;
var string = 'test string';
// validate
pattern.test(string)