how will i escape the slashes // in javascript
var j = /^(ht|f)tp(s?)://([\w-]+\.)+[\w-]+(/[\w-./?%&=]*)?$;/
Use a \ for escaping, like this:
var j = /^(ht|f)tp(s?):\/\/([\w-]+\.)+[\w-]+(\/[\w-./?%&=]*)?$;/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With