else {
// title text (case-insensitive unless caps in input)
var match = function(row) {
- return row.cells[1].textContent.match(query, /[A-Z]/.test(query) ? '' : 'i');
+ return row.cells[1].textContent.match(new RegExp(query, /[A-Z]/.test(query) ? '' : 'i'));
};
}
filterrows(table, match, action || 'filter');