diff --git a/lib/regexp-examples/constants.rb b/lib/regexp-examples/constants.rb index cc0b448..f4955c5 100644 --- a/lib/regexp-examples/constants.rb +++ b/lib/regexp-examples/constants.rb @@ -35,6 +35,9 @@ module CharSets Lower = Array('a'..'z') Upper = Array('A'..'Z') Digit = Array('0'..'9') + # Note: Punct should also include the following chars: $ + < = > ^ ` | ~ + # I.e. Punct = %w(! " # $ % & ' ( ) * + , - . / : ; < = > ? @ [ \\ ] ^ _ ` { | } ~) + # However, due to a ruby bug (!!) these do not work properly at the moment! Punct = %w(! " # % & ' ( ) * , - . / : ; ? @ [ \\ ] _ { }) Hex = Array('a'..'f') | Array('A'..'F') | Digit Word = Lower | Upper | Digit | ['_']