Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

fnFilter regular expression word boundary

$
0
0
I'm trying to apply a filter to find a tag in a column which contains comma-delimited terms, like "red, blue, green". I want to make sure that the term is matched completely (e.g. "red" shouldn't match "reddish") so I'm using something like:

oTable.fnFilter("\bred\b", 2, true);

But no rows are matched. The search works correctly on the filter example page (http://www.datatables.net/examples/api/regex.html), which makes me wonder what I'm doing wrong.

G.

Viewing all articles
Browse latest Browse all 1816

Trending Articles