From 886a4d3baa07bacc0fdfb732eb44ffca240d9415 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Thu, 25 Aug 2011 14:17:15 +0100 Subject: [PATCH] regex better --- modules/youare.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/youare.js b/modules/youare.js index 7d06685..7f95d96 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()*11); - var key = data.message.match(/ is|are ([\d\w\s,'-]*)\.?/); + var key = data.message.match(/ is|are ([\d\w\s']*),?\.?/); if(key[1].indexOf('and') !== -1) { key[1] = key[1].split('and')[0]; } // TODO: fix the regex to do this. i hate regex