diff --git a/src/TokenizedAttributedString.php b/src/TokenizedAttributedString.php index 825e960..e8fa2a8 100644 --- a/src/TokenizedAttributedString.php +++ b/src/TokenizedAttributedString.php @@ -163,7 +163,7 @@ public static function tokenizeOnWhitespace($string) { * @return array array of two arrays, with tokens at index 0 and their offsets at index 1 */ public static function tokenizeOnWords($string) { - return self::tokenizeOnRegex($string, '/([\w]+)/u'); + return self::tokenizeOnRegex($string, '/(\p{L}+)/u'); } /**