function fuzzysearch_cleanse in Fuzzy Search 6
Same name and namespace in other branches
- 7 fuzzysearch.module \fuzzysearch_cleanse()
Strip all non alphanumeric characters from a string
2 calls to fuzzysearch_cleanse()
- fuzzysearch_index_insert in ./
fuzzysearch.module - Insert the words into the database as they are indexed.
- fuzzysearch_process in ./
fuzzysearch.module - Process the search query
File
- ./
fuzzysearch.module, line 449 - Module file for fuzzysearch module.
Code
function fuzzysearch_cleanse($text) {
$text = strip_tags($text);
$text = drupal_strtolower($text);
return preg_replace('/[' . PREG_CLASS_SEARCH_EXCLUDE . ']+/u', ' ', $text);
}