Let's say i have a table with three rows. In one column, i have these vaules
- Assistant Coach
- Coach assistant coach
If i do a search now for "coach", all rows return. I don't want that. What I need is two sets of code to do the following operations:
1) to be able to type the word "coach" and only have it return rows 1 and 3.
2) to be able to type the word "coach" and only have it return row 1 (case sensitive)
In other words, I don't want any records returned that have the substring coach. Just coach. I haven't been able to figure this out as there is a space between assistant and coach and the regex i have recognizes the free standing word and returns it.
Let me know if this is possible.
My current code is:
var stringFilter = $(this).val();
var myregex = ("\\b" + stringFilter + "\\b");