From b4e07b8fb4f1c79cc8c6a09fcb18bb3d4e25ea98 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Tue, 9 Nov 2010 20:53:49 +0100 Subject: imdb: fix title regexp for missing second date --- data/rbot/plugins/imdb.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/data/rbot/plugins/imdb.rb b/data/rbot/plugins/imdb.rb index f0497c0b..a12b7784 100644 --- a/data/rbot/plugins/imdb.rb +++ b/data/rbot/plugins/imdb.rb @@ -143,7 +143,8 @@ class Imdb title_date = m[1].ircify_html debug title_date # note that the date dash for series is a - (ndash), not a - (minus sign) - pre_title, extra, date, junk = title_date.scan(/^(.*)\((.+?\s+)?(\d\d\d\d(?:–(?:\d\d\d\d)?)?(?:\/[IV]+)?)\)\s*(.+)?$/).first + # 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 extra.strip! if extra pre_title.strip! title = fix_article(pre_title) -- cgit v1.2.3