View Single Post
  #1  
Old 07-05-2011, 11:59 PM
 
xcart-dev xcart-dev is offline
 

Advanced Member
  
Join Date: Jun 2011
Posts: 59
 

Default Getting Quick Search to do Whole Word Searches

I've been looking around for an answer to this but can't seem to find one.

You can set the search results to be for 'any', 'all' or the exact phrase. What I need is to set the search to be the exact phrase and a whole word.

In php this would be
PHP Code:
if (preg_match("/\b$search_string\b/i"$database_output)) 
which results in a case insensitive result but only for whole words.

Now there must be somewhere in X-Carts many files where I can take the search result and change it into a 'whole word' requirement. This is important for part numbers such as the following:
Searching "EC-22" should only show up part number EC-22, not part number EC-22542.

Any suggestions how and where ... ?
__________________
X-Cart 4.4.3
Reply With Quote