We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 10fbd9a commit f197bcdCopy full SHA for f197bcd
perllib/mySociety/WebTestHarness.pm
@@ -670,7 +670,7 @@ email is returned with any quoted printable characters decoded.
670
671
=cut
672
sub email_get_containing($$) {
673
- my ($self, $check) = @_;
+ my ($self, $check, $regex) = @_;
674
675
die "STRING must be scalar or array" if (ref($check) ne 'ARRAY' && ref($check) ne '');
676
$check = [ $check ] if (ref($check) eq '');
@@ -688,7 +688,8 @@ sub email_get_containing($$) {
688
my $quoted_c = encode_qp($c, "");
689
push @params, $quoted_c;
690
}
691
- $qfragment = join($bool, map { 'content like ?' } @params);
+ my $match_op = defined $regex ? 'content similar to ?' : 'content like ?';
692
+ $qfragment = join($bool, map { $match_op } @params);
693
$qdesc = join($bool, map { "'$_'" } @params);
694
695
# Provoke any sending of mails
0 commit comments