[1.10] How do I search a column with regular expression? - column().search() with Regular Expression
[1.10] How do I search a column with regular expression? - column().search() with Regular Expression
blueeinstein
Posts: 2Questions: 0Answers: 0
Been staring at this for a while, and couldn't figure this out. Looking at, http://next.datatables.net/reference/api/column().search()
API: column().search( input [, regex[ , smart[ , caseInsen ]]]
Trying to filter a column with a 'startsWith' letter "K" function, I tried below but didn't work:
oTable.columns(2).search("K*", true, false, true).draw(); // regex=true, smart=false, case=true
I saw on the forums to add "\b" (to notate startsWith), doesn't work either:
oTable.columns(2).search("\bK*", true, false, true).draw(); // regex=true, smart=false, case=true
Naturally, I tried the common regular expression "^", doesn't work either:
oTable.columns(2).search("^K*", true, false, true).draw(); // regex=true, smart=false, case=true
Help please?
API: column().search( input [, regex[ , smart[ , caseInsen ]]]
Trying to filter a column with a 'startsWith' letter "K" function, I tried below but didn't work:
oTable.columns(2).search("K*", true, false, true).draw(); // regex=true, smart=false, case=true
I saw on the forums to add "\b" (to notate startsWith), doesn't work either:
oTable.columns(2).search("\bK*", true, false, true).draw(); // regex=true, smart=false, case=true
Naturally, I tried the common regular expression "^", doesn't work either:
oTable.columns(2).search("^K*", true, false, true).draw(); // regex=true, smart=false, case=true
Help please?
This discussion has been closed.
Replies
http://live.datatables.net/mobedan/1/edit
Allan
Yes, fnGetData and friends will work in 1.10. The 'New API' section of the upgrade notes mentions this:
http://next.datatables.net/new/1.10
Allan