@@ -132,7 +132,7 @@ public function tokenise($input)
132132 *
133133 * Regexes:
134134 * 1. Remove everything except letters, numbers, quotes, apostrophe, plus, dash, period, and comma.
135- * 2. Remove plus, dash, period, and comma characters located before letter characters.
135+ * 2. Remove plus, dash, and comma characters located before letter characters.
136136 * 3. Remove plus, dash, period, and comma characters located after other characters.
137137 * 4. Remove plus, period, and comma characters enclosed in alphabetical characters. Ungreedy.
138138 * 5. Remove orphaned apostrophe, plus, dash, period, and comma characters.
@@ -142,7 +142,7 @@ public function tokenise($input)
142142 */
143143 $ input = StringHelper::strtolower ($ input );
144144 $ input = preg_replace ('#[^\pL\pM\pN\p{Pi}\p{Pf} \'+-.,]+#mui ' , ' ' , $ input );
145- $ input = preg_replace ('#(^|\s)[+-. ,]+([\pL\pM]+)#mui ' , ' $1 ' , $ input );
145+ $ input = preg_replace ('#(^|\s)[+-,]+([\pL\pM]+)#mui ' , ' $1 ' , $ input );
146146 $ input = preg_replace ('#([\pL\pM\pN]+)[+-.,]+(\s|$)#mui ' , '$1 ' , $ input );
147147 $ input = preg_replace ('#([\pL\pM]+)[+.,]+([\pL\pM]+)#muiU ' , '$1 $2 ' , $ input );
148148 $ input = preg_replace ('#(^|\s)[ \'+-.,]+(\s|$)#mui ' , ' ' , $ input );
0 commit comments