From: Matthias Hecker Date: Sat, 25 Apr 2020 18:52:25 +0000 (+0200) Subject: plugin(imdb): fix title regex, closes #44 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;ds=sidebyside;h=cb192caad83164924f615cfe43123c4d24103387;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git plugin(imdb): fix title regex, closes #44 --- diff --git a/data/rbot/plugins/imdb.rb b/data/rbot/plugins/imdb.rb index 0f5c6024..3ca21035 100644 --- a/data/rbot/plugins/imdb.rb +++ b/data/rbot/plugins/imdb.rb @@ -150,7 +150,7 @@ class Imdb debug title_date # note that the date dash for series is a - (ndash), not a - (minus sign) # also, the second date, if missing, is an no-break space - pre_title, extra, date, junk = title_date.scan(/^(.*)\((.+?\s+)?(\d\d\d\d(?:–(?:\d\d\d\d| )?)?(?:\/[IV]+)?)\)\s*(.+)?$/).first + pre_title, extra, date, junk = title_date.scan(/^(.*)\((.+?\s+)?(\d\d\d\d(?:–(?:\d\d\d\d| )?)?(?:\/[IV]+)?)[^\)]*\)\s*(.+)?$/).first extra.strip! if extra pre_title.strip! title = fix_article(pre_title)