From 6785ec225ae4657ec8742e89a9d7653ad91e01ca Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 19 Jun 2016 11:40:53 +1200 Subject: Simplify/tidy regex calls --- urxvt/ext/selection | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/urxvt/ext/selection b/urxvt/ext/selection index edc1a1bb..2ca08011 100644 --- a/urxvt/ext/selection +++ b/urxvt/ext/selection @@ -21,7 +21,7 @@ sub on_init { if ( defined( my $res = $self->resource('cutchars') ) ) { $res = $self->locale_decode($res); push @{ $self->{patterns} }, - qr{\G [\Q$res\E[:space:]]* ([^\Q$res\E[:space:]]+) }x; + qr{\G [\Q$res\E[:space:]]* ([^\Q$res\E[:space:]]+) }msx; } $self->{enabled} = 1; @@ -49,7 +49,7 @@ sub on_sel_extend { study $text; # _really_ helps, too :) for my $regex ( @{ $self->{patterns} } ) { - while ( $text =~ /$regex/g ) { + while ( $text =~ m{$regex}gmsx ) { if ( $LAST_MATCH_START[1] <= $markofs and $markofs <= $LAST_MATCH_END[1] ) { -- cgit v1.2.3