On 1.9.2, I’m seeing an “invalid character property name” error from
Regexp
for the named properties Any, Ascii, and Xdigit, but none of the others.
If
I add the u option to the expression, it works.
I expected that all the names would either require the u option, or they
wouldn’t. If it was just Any and Ascii, I would accept it and move on,
but
Xdigit doesn’t seem to belong with the other two.
Trying to understand why Any, Ascii, and Xdigit are “special”. Any clues
greatly appreciated.
On 1.9.2, I’m seeing an “invalid character property name” error from Regexp
for the named properties Any, Ascii, and Xdigit, but none of the others. If
I add the u option to the expression, it works.
It was bad documentation! Xdigit should be XDigit, and Ascii should be
ASCII. Any requires encoding to be specified, which makes sense.
I submitted an issue against it, with reference to source code, at:
It has been very difficult finding detailed information about many of
the
1.9 regular expression features. Read Ruby has the most coverage I have
found so far.
Regards,
Ammar
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.