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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleURL 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