From 5b965657bba6c7de3d1f29033969b4658021fd89 Mon Sep 17 00:00:00 2001 From: Luke Slater Date: Tue, 22 Jan 2013 12:21:14 +0100 Subject: [PATCH] second part of the regexen can be empty --- modules/regex/regex.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/regex/regex.js b/modules/regex/regex.js index 42182aa..0444950 100644 --- a/modules/regex/regex.js +++ b/modules/regex/regex.js @@ -3,7 +3,7 @@ var _ = require('underscore')._; var regex = function(dbot) { this.last = {}; this.listener = function(event) { - var q = event.message.valMatch(/^([\d\w\s]*)?:? ?s\/(.+)\/(.+)\/([ig]*)?$/, 5); + var q = event.message.valMatch(/^([\d\w\s]*)?:? ?s\/(.+)\/(.+)?\/([ig]*)?$/, 5); if(q) { var flags = q[4], toMatch = new RegExp(q[2], flags),