Regular expression for validating a url

To control who can see the experiment, use audiences.

This site and all of its contents are referring to Angular JS (version 1.x), if you are looking for the latest Angular, please visit

regular expression for validating a url-10regular expression for validating a url-69regular expression for validating a url-25regular expression for validating a url-28

Currently there are numerous solutions for validating URLs. the real issuse is that both methods dont check for "FILTER_FLAG_HOST_REQUIRED" which actually doesent work altough it should check ending... I have been trying to find a good solution for testing for URL's, I would not use the filter_var() for this kind of check. The only way i have found to check for them is either use regex or use the parse_url and check each section.

:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9] )(?

:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9] )*(?

Note that the challenge does not cover all possible valid URL constructs.

The unit test contains several URLs which should be valid and not valid which are not part of the challenge.

Leave a Reply