SaaS CMS has officially launched! Learn more now.

Set Textbox field with regex pattern to disallow URL's (http/www)


I'm looking for a regex pattern that allows only alphanumeric and disallows URL's with ignore case option that could have http,https and www in name textbox fields. 

Much appreciated for any quick help on this. 

Nov 25, 2021 8:28

If you want to explicit dissallow http/https/www you can use this (it's not ignore case):

^((?!www|http)[a-z0-9\-_ ])*$

But, you can't write an URL without the `://` part,  can you? So maybe this will do, it will ignore case and only allow "word characters" and whitespace

Nov 25, 2021 11:34

Thanks Tomas Hensrud Gulla for your response. 

Dec 10, 2021 10:10
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.