Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35273

Regex and server-side processing not really working

$
0
0

Hello, I have a column filled with numerical values and could not get any valid response when searching using regular expressions. For example: this one is working excellent when searching for '3', but returning as well all the rows containing '3' (like '33', '36', '39')

var select = $('SELECT_OPTIONS') .appendTo( $(this).empty() ).on( 'change', function () {table.column( idx ).search( $(this).val(), true, false ).draw();});

so instead I want to use a simple regex like

var select = $('SELECT_OPTIONS') .appendTo( $(this).empty() ).on( 'change', function () {table.column( idx ).search( '^' + $(this).val() + '$', true, false ).draw();});

Data is send correctly to the server, no errors in console.

May be somebody had a similar situation or issue.

Thank you.


Viewing all articles
Browse latest Browse all 35273

Trending Articles