Javascript regular expression problem to match a set of numbers

I’ve been working on a regular expression and just couldn’t figure it out.

^((?!106|97|129|3|179|220|221|222)).*$

Basically what I need is for a datatable row to hide if the value of a column is any of the following. (106,97,129,3,179,220,221,222)

dt.column(1).search('^((?!106|97|129|3|179|220|221|222)).*$', true, false).draw(true);

Thanks in advance!

43 thoughts on “Javascript regular expression problem to match a set of numbers”

Leave a Comment