简体   繁体   中英

Can we search multiple strings in multiple columns in data tables?

I want to search multiple strings in multiple columns (not all the columns)

var val='profile|officer|work'; 
oTable.api().columns([0,1]).search(val, true, false ).draw();

I tried above code but its not working

The regular expression seems to be wrong.

If you want to match one of those words you should use this regex expression:

\\bprofile\\b|\\bofficer\\b|\\bworker\\b

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM