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