How does one allow a search for a plural keyword s to return the singular as well
How does one allow a search for a plural keyword s to return the singular as well

Using bSmart column filtering, how does one allow a search for a plural keyword to return the singular as well? Lets assume only keywords that are pluralized by the letter s on the end.
Here is the codeblock I am looking at:
if ( bSmart )
{
/* Generate the regular expression to use. Something along the lines of:
* ^(?=.*?\bone\b)(?=.*?\btwo\b)(?=.*?\bthree\b).*$
*/
asSearch = bRegex ? sSearch.split( ' ' ) : _fnEscapeRegex( sSearch ).split( ' ' );
sRegExpString = '^(?=.*?'+asSearch.join( ')(?=.*?' )+').*$';
return new RegExp( sRegExpString, bCaseInsensitive ? "i" : "" );
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
There is currently no option for that I'm afraid. Your best bet would probably be to just remove the plural from the submitted search word(s) and search on that only.
You'd need to consider non-trivial plurals as well, such as
es
as well. Probably not too bad if you are only handling English language, but a nightmare if you are doing a multi-lingual interface.Allan
Hey Allan. First time posting, thanks for your fast reply.