URL Validation REGEX - URL just valid with http://

后端 未结 5 1145
梦谈多话
梦谈多话 2020-12-14 17:50

How it works

I have an input field to enter the URL of a Website and i wanna check it and if the URL is OK i will give the inputfield a class(\"vali

5条回答
  •  悲&欢浪女
    2020-12-14 18:32

    This will work:

    (?\w+):\/\/(?[\w@][\w.:@]+)\/?[\w\.?=%&=\-@/$,]*
    

    Hope it may help you

提交回复
热议问题