diff --git a/lib/regexp_parser/scanner/property.rl b/lib/regexp_parser/scanner/property.rl index 64edb63..822d035 100644 --- a/lib/regexp_parser/scanner/property.rl +++ b/lib/regexp_parser/scanner/property.rl @@ -17,7 +17,7 @@ text = copy(data, ts-1, te) type = (text[1] == 'P') ^ (text[3] == '^') ? :nonproperty : :property - name = data[ts+2..te-2].pack('c*').gsub(/[\^\s_\-]/, '').downcase + name = text[3..-2].gsub(/[\^\s_\-]/, '').downcase token = self.class.short_prop_map[name] || self.class.long_prop_map[name] validation_error(:property, name) unless token