Skip to content

Instantly share code, notes, and snippets.

@weekwood
Created December 24, 2012 01:16
Show Gist options
  • Save weekwood/4367006 to your computer and use it in GitHub Desktop.
Save weekwood/4367006 to your computer and use it in GitHub Desktop.
Regex to catch @mention #hashtag and link http(s)://
NSRegularExpression *regex = [NSRegularExpressionregularExpressionWithPattern:@"((@|#)([A-Z0-9a-z(é|ë|ê|è|à|â|ä|á|ù|ü|û|ú|ì|ï|î|í)\u4e00-\u9fa5_]+))|(http(s)?://([A-Z0-9a-z._-]*(/)?)*)" options:NSRegularExpressionCaseInsensitive error:&error];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment