Skip to content

Commit

Permalink
Support trailing slashes
Browse files Browse the repository at this point in the history
  • Loading branch information
thomassnielsen committed May 13, 2014
1 parent 614cf13 commit fe7c6ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/PAMWebBrowserViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ - (IBAction)go:(id)sender
else
{
NSError *error = [[NSError alloc] init];
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\\.([a-zA-Z]{2,6}|[a-zA-Z0-9-]{2,30}\\.[a-zA-Z]{2,3})$" options:NSRegularExpressionCaseInsensitive error:&error];
NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9]))\\.([a-zA-Z]{2,6}|[a-zA-Z0-9-]{2,30}\\.[a-zA-Z]{2,3})/?$" options:NSRegularExpressionCaseInsensitive error:&error];
if ([[regex matchesInString:urlString options:0 range:NSMakeRange(0, urlString.length)] count] > 0)
{
#if DEBUG
Expand Down

0 comments on commit fe7c6ba

Please sign in to comment.