Browse Source

Cleaning up the regexp for #69.

devel
Jonathan Rosenbaum 6 years ago
parent
commit
b18cf97f7c
  1. 6
      Connections/database_functions.php

6
Connections/database_functions.php

@ -330,9 +330,9 @@ function highlightKeywords($text, $keyword) {
$wordsAry = explode(" ", $keyword);
$wordsCount = count($wordsAry);
// Using REGEXP so remove regex from search
$find = array('/\*/', '/\./', '/\$/', '/\^/', '/\?/', '/\+/', '/\[/', '/\]/', '/\|/', '/\(/', '/\)/', '/\,/', '/\{/', '/\}/', '/\:/', '/\\\/');
$replace = array('', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '');
// Using REGEXP, this removes regex from search
$find = array('/[\*\.\$\^\?\+\[\]\|\(\)\,\{\}\:\\\]/');
$replace = array('');
for($i=0;$i<$wordsCount;$i++) {

Loading…
Cancel
Save