From 8e1d4d57229adad7ed3caa9c8629062b31b93839 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Thu, 25 Aug 2011 14:45:42 +0100 Subject: [PATCH] god damned regex i'll kill them all --- modules/youare.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/youare.js b/modules/youare.js index beeb984..232801a 100644 --- a/modules/youare.js +++ b/modules/youare.js @@ -4,7 +4,7 @@ var youAre = function(dbot) { return { 'listener': function(data) { var num = Math.floor(Math.random()*6); - var key = data.message.match(/(is|are) ([\d\w\s']*),?\.?/); + var key = data.message.match(/(is|are) ([\d\w\s']*)(,|\.)?/); if(num == 1 && key != undefined) { if(key[2].indexOf('and') !== -1) {