Changeset 3445
- Timestamp:
- 12/08/06 20:44:43 (2 years ago)
- Files:
-
- trunk/Additions/NSAttributedStringMoreAdditions.m (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Additions/NSAttributedStringMoreAdditions.m
r3418 r3445 309 309 - (void) makeLinkAttributesAutomatically { 310 310 // catch well-formed urls like "http://www.apple.com", "www.apple.com" or "irc://irc.javelin.cc" 311 AGRegex *regex = [AGRegex regexWithPattern:@"(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}: (?!:)(?:(?!\\p{N}{,6}\\b)|(?://)?)|www\\.)[\\p{L}\\p{N}$\\-_+*'\"=\\|/\\\\(){}[\\]%@&#~,:;.!?]{4,}[\\p{L}\\p{N}$\\-_+*=\\|/\\\\({%@&#~]" options:AGRegexCaseInsensitive];311 AGRegex *regex = [AGRegex regexWithPattern:@"(?:[a-zA-Z][a-zA-Z0-9+.-]{2,}://|www\\.)[\\p{L}\\p{N}$\\-_+*'\"=\\|/\\\\(){}[\\]%@&#~,:;.!?]{4,}[\\p{L}\\p{N}$\\-_+*=\\|/\\\\({%@&#~]" options:AGRegexCaseInsensitive]; 312 312 NSArray *matches = [regex findAllInString:[self string]]; 313 313 NSEnumerator *enumerator = [matches objectEnumerator];
