I am using jQuery (I don't know if this is relevant), here is regex:
var re = new RegExp('\\b' + a_filter + '\\b');
Thus, it matches whole words in the a_filter variable, which has a bunch of words. Now it will match the wrench, but not the wrenches. He will match "chair", but not "chairs", he will match "john", but not "john's". I tried, but I can’t understand.
Can someone please help me adjust my regex above to allow this at the end of a word?
s es 's is what I want to resolve at the end of a word match, so I don’t need to include all the possible variations of each word. I think that all the words end with someone actually typing, if you know more, it would be great to get help, THANKS!
EDIT: here is my jsfiddle, maybe I had a_filter mixed with filter_tags , I think I'm doing it back, pah. ???
http://jsfiddle.net/nicktheandroid/mMTsc/18/
source share