> 2) A literal '-' in a character class should be escaped too if the 
>    class has other '-' literals for range representation.  For
> instance, 
>    /[abcd-f-hijk]/ and /[--abc]/ should be written as 
>    /[abcd-f\-hijk]/ (or /[abcd\-f-hijk]/) and /[\--abc]/.
>    You can use '-' without '\' if the class has no ranges, like
>    /[-abc]/ or /[^-]/.


Ick.  Any reason why the standard "if '-' occurs as the first or last
character in the character class, it matches itself" behavior isn't
being used in Ruby?  

Regex syntax is fractured enough now that I'm unsure of the wisdom of
adding yet another variation on it.  Is there some compelling
advantage to this that I'm missing?


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com