Merge pull request #618 from RCTrapdoor/patch-3

Update regex.js
This commit is contained in:
Luke Slater 2014-06-19 14:33:46 +01:00
commit abab37b71e

View File

@ -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),