@@ -539,11 +539,11 @@ private function searchOverData($params, $raw_query)
539539 $ escaped_chunk = preg_quote ($ chunk , '# ' );
540540 $ chunk_is_word = ! preg_match ('#\s# ' , $ chunk );
541541 $ regex = [
542- 'partial_anywhere ' => '# ' .$ escaped_chunk .'#i ' ,
543- 'partial_from_start_anywhere ' => '#(^|\s) ' .$ escaped_chunk .'#i ' ,
544- 'whole_anywhere ' => '#(^|\s) ' .$ escaped_chunk .'($|\s)#i ' ,
545- 'partial_from_start ' => '#^ ' .$ escaped_chunk .'#i ' ,
546- 'whole ' => '#^ ' .$ escaped_chunk .'$#i ' ,
542+ 'partial_anywhere ' => '# ' .$ escaped_chunk .'#iu ' ,
543+ 'partial_from_start_anywhere ' => '#(^|\s) ' .$ escaped_chunk .'#iu ' ,
544+ 'whole_anywhere ' => '#(^|\s) ' .$ escaped_chunk .'($|\s)#iu ' ,
545+ 'partial_from_start ' => '#^ ' .$ escaped_chunk .'#iu ' ,
546+ 'whole ' => '#^ ' .$ escaped_chunk .'$#iu ' ,
547547 ];
548548
549549 // loop over each data property
@@ -710,8 +710,8 @@ private function searchOverData($params, $raw_query)
710710 */
711711 private function removeDisallowedMatches ($ params )
712712 {
713- $ disallowed = '# ' .implode ('| ' , $ params ['disallowed ' ]).'#i ' ;
714- $ required = '#(?=.* ' .implode (')(?=.* ' , $ params ['required ' ]).')#i ' ;
713+ $ disallowed = '# ' .implode ('| ' , $ params ['disallowed ' ]).'#iu ' ;
714+ $ required = '#(?=.* ' .implode (')(?=.* ' , $ params ['required ' ]).')#iu ' ;
715715 $ new_data = [];
716716
717717 // this only applies to boolean mode
@@ -1058,7 +1058,7 @@ private function extractSnippets($value, $chunks)
10581058 $ escaped_chunks = collect ($ chunks )
10591059 ->map (fn ($ chunk ) => preg_quote ($ chunk , '# ' ))
10601060 ->join ('| ' );
1061- $ regex = '#(.*?)( ' .$ escaped_chunks .')(.{0, ' .$ length .'}(?:\s|$))#i ' ;
1061+ $ regex = '#(.*?)( ' .$ escaped_chunks .')(.{0, ' .$ length .'}(?:\s|$))#iu ' ;
10621062 if (! preg_match_all ($ regex , $ value , $ matches , PREG_SET_ORDER )) {
10631063 return [];
10641064 }
@@ -1081,7 +1081,7 @@ private function extractSnippets($value, $chunks)
10811081 }
10821082 $ snippets [] = trim ($ snippet );
10831083 }
1084- if (preg_match ('#( ' .$ escaped_chunks .')#i ' , $ surplus )) {
1084+ if (preg_match ('#( ' .$ escaped_chunks .')#iu ' , $ surplus )) {
10851085 $ snippets [] = trim ($ surplus );
10861086 }
10871087
0 commit comments