6 lines
182 B
JavaScript
6 lines
182 B
JavaScript
PatternMatcher.strategies['evalregex'] = function(regexpString) {
|
|
this.regexp = eval(regexpString);
|
|
this.matches = function(actual) {
|
|
return this.regexp.test(actual);
|
|
};
|
|
}; |