diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-20 18:47:15 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-07-20 18:47:15 +0400 |
commit | 8321dee67dfcdc19bad7f740ada06f54b8b0b167 (patch) | |
tree | 471313a30104f9652a20fd8baaf218c1bf676efa /perl | |
parent | 8f6f83004804ab50f360fb3c776413ea3a9adc2c (diff) | |
download | rspamd-8321dee67dfcdc19bad7f740ada06f54b8b0b167.tar.gz rspamd-8321dee67dfcdc19bad7f740ada06f54b8b0b167.zip |
* Use ungreedy match to strip trailing whitespaces
Diffstat (limited to 'perl')
-rw-r--r-- | perl/lib/Mail/Rspamd/Client.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perl/lib/Mail/Rspamd/Client.pm b/perl/lib/Mail/Rspamd/Client.pm index 7f32cd6ee..eb92cada4 100644 --- a/perl/lib/Mail/Rspamd/Client.pm +++ b/perl/lib/Mail/Rspamd/Client.pm @@ -964,23 +964,23 @@ sub _do_rspamc_command { }; $cur_metric = $1; } - elsif ($line =~ /^Symbol: (\S+);\s*(.+)\s*${EOL}$/ && $cur_metric) { + elsif ($line =~ /^Symbol: (\S+);\s*(.+?)\s*$/ && $cur_metric) { # Line with parameters my $symref = $metrics{$cur_metric}->{'symbols'}; push(@$symref, "$1($2)"); } - elsif ($line =~ /^Symbol: (\S+)\s*/ && $cur_metric) { + elsif ($line =~ /^Symbol: (\S+?)\s*$/ && $cur_metric) { my $symref = $metrics{$cur_metric}->{'symbols'}; push(@$symref, $1); } - elsif ($line =~ /^Urls: (.+)\s*$/ && $cur_metric) { + elsif ($line =~ /^Urls: (.+?)\s*$/ && $cur_metric) { @{ $metrics{$cur_metric}->{'urls'} } = split /,\s+/, $1; } - elsif ($line =~ /^Message: (.+)\s*$/ && $cur_metric) { + elsif ($line =~ /^Message: (.+?)\s*$/ && $cur_metric) { my $symref = $metrics{$cur_metric}->{'messages'}; push(@$symref, $1); } - elsif ($line =~ /^Action: (.+)\s*$/ && $cur_metric) { + elsif ($line =~ /^Action: (.+?)\s*$/ && $cur_metric) { $metrics{$cur_metric}->{'action'} = $1; } elsif ($line =~ /^${EOL}$/) { |