Quantcast
Channel: URL Validation function improving - Stack Overflow
Browsing latest articles
Browse All 6 View Live

Answer by Kiran Bhoraniya for URL Validation function improving

-(BOOL)validateUrl{// NSString *urlRegEx = @"((?:http|https)://)?(www\\.)[\\w\\d\\-_]+\\.\\w{2,3}(\\.\\w{2})?(/(?<=/)(?:[\\w\\d\\-./_]+)?)?"; NSString *urlRegEx =...

View Article


Answer by DonBaron for URL Validation function improving

Old thread but I think my amendments may be helpful to someone else landing here:I didn't like to check only for a "www" as a hostname, nowadays we may encounter different hostnames... Thus I extended...

View Article


Answer by Nava Carmon for URL Validation function improving

Well, I found something on Microsoft site and with slight changes it's the best expression so...

View Article

Answer by Josha Inglis for URL Validation function improving

This would be my attempt:((?:http|https)://)?(?:www\\.)?[\\w\\d\\-_]+\\.\\w{2,3}(\\.\\w{2})?(/(?<=/)(?:[\\w\\d\\-./_]+)?)?EDITAdded in a back-reference (?<=/)for extra specificityEDIT 2Added...

View Article

Answer by Jigar Pandya for URL Validation function improving

Try to change the *regex = line with following.NSString *regex = "(http|ftp|https)://[\w-_]+(.[\w-_]+)+([\w-.,@?^=%&:/~+#]* [\w-\@?^=%&/~+#])?"

View Article


URL Validation function improving

i use this function to check if an URL is valid or not. it works for most of the cases, but here the following URL it return that is not...

View Article
Browsing latest articles
Browse All 6 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>