-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[[:punct:]] and \p{Punct} #42
Comments
I think this is wrong; both Unicode and non-Unicode should match the nine characters. http://search.cpan.org/~shay/perl-5.20.2/pod/perlreref.pod I believe the difference should actually be that under Unicode enoding, |
Now /(?u)[[:punct:]]/ and /\p{XPosixPunct}/ have the same meaning when Unicode encodings are used. On the other hand, /\p{Punct}/ is not changed. /(?u)[[:punct:]]/ == /\p{XPosixPunct}/ == /[\p{Punct}$+<=>^`|~]/ \p{XPosixPunct} can be used only with Unicode encodings. For other encodings, /[[:punct:]]/ is the same with /\p{Punct}/. They both includes the nine characters: "$+<=>^`|~".
I have decided to change the behavior of |
Closing. |
Perl's document (perlrecharclass) says that:
In current Onigmo,
[[:punct:]]
and\p{Punct}
is the same in the ASCII range and they depend on the encoding.If the encoding is Unicode encoding,
[[:punct:]]
and\p{Punct}
don't match the nine characters.If the encoding is not Unicode encoding,
[[:punct:]]
and\p{Punct}
match the nine characters.Is it OK?
The text was updated successfully, but these errors were encountered: