Regex search with multiple values

Regex search with multiple values

zbellerosezbellerose Posts: 7Questions: 0Answers: 0

I'm working on implementing a feature into the datatable we are currently using to search multiple account numbers at once. The column I'm trying to search has probably 50-60 numbers, and I want to be able to search a few at a time. With that being said, I've produced the following code:

this.column(val).search("^(" + searchSource.replace(',', '|') + ")$", true, false, true).draw();

and users can use the following to search for multiple values: "40,22".

When I go further than 2 values, for instance "40,22,205" it will only show the first value, "40"

tl:dr - I can search for 2 values but not more than 2. Anything past 2 values causes only the first value to be searched.

Replies

Sign In or Register to comment.