… | |
… | |
12 | # "find interetsing things"-patterns |
12 | # "find interetsing things"-patterns |
13 | my @mark_patterns = ( |
13 | my @mark_patterns = ( |
14 | # urls, just a heuristic |
14 | # urls, just a heuristic |
15 | qr{( |
15 | qr{( |
16 | (?:https?|ftp|news|mailto|file)://[ab-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27(),~]+ |
16 | (?:https?|ftp|news|mailto|file)://[ab-zA-Z0-9\-\@;\/?:&=%\$_.+!*\x27(),~]+ |
17 | [ab-zA-Z0-9\-\@;\/?:&=%\$_+!*\x27(),~] # do not include a trailing dot, its wrong too often |
17 | [ab-zA-Z0-9\-\@;\/?:&=%\$_+!*\x27()~] # exclude some trailing characters (heuristic) |
18 | )}x, |
18 | )}x, |
19 | |
19 | |
20 | # common "parentheses" |
20 | # common "parentheses" |
21 | qr{(?:^|\s) ‘ ([^‘’]+?) ’ (?:\s|\)|$)}x, |
21 | qr{(?:^|\s) ‘ ([^‘’]+?) ’ (?:\s|\)|$)}x, |
22 | qr{(?:^|\s) ` ([^`']+?) ' (?:\s|\)|$)}x, |
22 | qr{(?:^|\s) ` ([^`']+?) ' (?:\s|\)|$)}x, |