Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82012

fnFilter and regex not playing nice for me

$
0
0
I have a very frustrating problem that is making no sense to me. I have a table with column index 3 containing strings such as 'AVAIL', 'SHPD', 'RTND', etc. I'm trying to use regex to filter either AVAIL OR SHPD with no luck.

Example:
asset_filter = 'AVAIL|SHPD';
asset_table.fnFilter(asset_filter, 3, false);

Which matches nothing, but when asset_filter = 'AVAIL', it finds those ok, it's just when I add the pipe that it doesn't work. I've even tried asset_filter = ^(AVAIL|SHPD)$, which is correct regex but doesn't match anything. Even ^(AVAIL)$ doesn't match anything when it should.

The data table is initialized with:
asset_table = $(".asset_list_table").dataTable({
	"bPaginate": false,
	"bInfo": false,
	"aaSorting": [[3,'asc'], [0,'asc']],
	"aoColumns": [
		{"sType": "num-html"},
		{"sType": "string"},
		{"sType": "string"},
		{"sType": "string"},
	]
});

Nothing else has been done to the table. Can you see something I'm doing wrong? I'm using 1.7 beta 5.

Viewing all articles
Browse latest Browse all 82012

Trending Articles