summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-11-09 20:53:49 +0100
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2010-11-09 20:53:49 +0100
commitb4e07b8fb4f1c79cc8c6a09fcb18bb3d4e25ea98 (patch)
tree6085d4f0657e24150e57e3a7fc9187485846b341
parent6eed70298a021fc6b789936c8fa7e591ac6427be (diff)
imdb: fix title regexp for missing second date
-rw-r--r--data/rbot/plugins/imdb.rb3
1 files changed, 2 insertions, 1 deletions
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)