Need a regular expression to validate a single URL/domain value.
I am using the below regular expression to perform URL validation for an attribute, however it is accepting multiple values
Regular expression: ^(http|https):\/\/[a-z0-9]+([-.]{1}[a-z0-9]+)*\.[a-z]{2,5}(([0-9]{1,5})?\/.*)?$
when provided the attribute value as (two domains with comma separated values) "https://www.thebatmanmovie.com.tw/,https://thebatman.entradaswb.com/" , its not throwing any error.
please help with Regex that performs single url/domain validation at a time.
-
Have a look at this article.
Quite a few options
Please sign in to leave a comment.
1 Comments