Reputation: 557
I am working with the jQuery datatables library and passing a regular expression to filter a particular column.
I'd like to pass something like "Test 123" and "Test 321" and it return any rows with either of those two words.
I have tried something like this without any luck:
/(?=.*?TEST 123)(?=.*?TEST 321).*/i
I've also tried this, but only returns the second result
TEST 123|TEST 321
Thanks in advance!
Upvotes: 1
Views: 588
Reputation: 34416
Added the 'OR' condition to the test -
(TEST 123)|(TEST 321)
Tested at http://regexpal.com
Upvotes: 1