Browse Source

* case-insensitive match

master
Alex 'AdUser' Z 9 years ago
parent
commit
0d543de660
  1. 4
      twatch-lite

4
twatch-lite

@ -133,10 +133,10 @@ sub process_feed {
foreach my $match (@{ $feedconf->{matches} }) {
if ($match =~ m{^/(.*)/$}) {
_log(debug => "Trying regex '$1'");
next unless $text =~ qr/$1/;
next unless $text =~ qr/$1/i;
} else {
_log(debug => "Trying substr '$match'");
next unless index($text, $match) >= 0;
next unless index(lc($text), lc($match)) >= 0;
}
# gotcha!
my $msg = sprintf "Got it! URL: %s (%s)", $entry->link, $entry->title;

Loading…
Cancel
Save