Actions
Bug #10891
closed/[[:punct:]]/ POSIX group broken (with string literals?)
Description
The regular expression: /[[:punct:]]/
should match the following characters:
! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \ ] ^ _ ` { | } ~
However, it only works for these characters:
! " # % & ' ( ) * , - . / : ; ? @ [ \\ ] _ { }
And does not work for these characters:
$ + < = > ^ ` | ~
However, this is where it gets really weird... Consider the following:
60.chr == "<" # true
60.chr =~ /[[:punct:]]/ # => 0
"<" =~ /[[:punct:]]/ # => nil
So, it seems that the regular expression only fails for string literals!
Actions
Like0
Like0Like0Like0Like0Like0Like0Like0