aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2021-06-03 11:35:36 +0200
committerAnton Khirnov <anton@khirnov.net>2021-06-03 11:35:36 +0200
commitf2dd23b937d0baf787b74b2084d657cda32eb19e (patch)
tree715ac2ba1735b125bb0f4a019e4d0f32c85ce5da
parent82bfb2fa04761da2d8c7cf1d76116f9ce90325c3 (diff)
Add a simple email message-id match.
-rw-r--r--reselect4
1 files changed, 4 insertions, 0 deletions
diff --git a/reselect b/reselect
index f3d2240..92d5581 100644
--- a/reselect
+++ b/reselect
@@ -14,6 +14,8 @@ my $re_url =
my $re_git_hash = qr{\b[0-9a-f]{7,40}\b}x;
+my $re_message_id = qr{<\S+?@\S+?>}x;
+
sub find_matches {
my ($pattern, $text, $rowmap) = @_;
@@ -74,6 +76,8 @@ sub on_action {
$pattern = $re_url;
} elsif ($cmd eq 'git_hash') {
$pattern = $re_git_hash;
+ } elsif ($cmd eq 'message_id') {
+ $pattern = $re_message_id;
} else {
return;
}