Skip to content

Commit

Permalink
another fix for tokenizeOnWords()
Browse files Browse the repository at this point in the history
  • Loading branch information
apemsel committed Mar 8, 2016
1 parent 24f053c commit 88bec4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TokenizedAttributedString.php
Original file line number Diff line number Diff line change
Expand Up @@ -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, '/(\p{L}+)/u');
return self::tokenizeOnRegex($string, '/([\p{L}\p{S}\p{N}]+)/u');
}

/**
Expand Down

0 comments on commit 88bec4e

Please sign in to comment.