From: Daniel Brockman Date: 2005-07-23T02:51:48+09:00 Subject: Re: ruby script hangs on regex match Hi Adrian, > I have a regex infinte loop kind of problem. I use ruby > 1.8.2. The regular expression I used was: > > [tT]he\s+(([\w\d\_]+(?:[a-zA-Z][\dA-Z]|[\dA-Z][a-zA-Z]) > [\w\d\_]*((\s*(\,|and|or)\s*)*[\w\d\_]+(?:[a-zA-Z][\dA-Z] > |[\dA-Z][a-zA-Z])[\w\d\_]*)*))\s+((\w+\s+){0,3}\s* > (proteins|genes|protein|gene)) I just wanted to point out that if you add the /x flag to the regexp, you can insert whitespace and comments at will. That can sometimes make the expression pseudo-readable. -- Daniel Brockman So really, we all have to ask ourselves: Am I waiting for RMS to do this? --TTN.