From: William James Date: 2008-11-02T08:54:40+09:00 Subject: Re: problems with regular expressions and parenthesis Daniel Fac wrote: > hi, > i'm having some trouble with regular expressions in ruby. > If I have a regular expression like this: > ^([\x20-\x7E]|\w){1,40}$, it will crash ruby if there are more than > forty characters in it. I don't understand what is wrong with this > expression, if my expression is changed to > ^([\A-Za-z]|\w){1,40}$ it works perfectly well > so does this one: ^([\x20-\x7E]|\w){1,40}$ What do you mean by "so does this one"? It's the same as the first one.