From: Josef 'Jupp' Schugt Date: 2003-04-08T21:42:37+09:00 Subject: Re: ruby-dev summary 19944 - 19957 Saluton! * Brian Candler ; 2003-04-07, 20:40 UTC: > I often use character classes like this: > > /[a-zA-Z0-9.-]/ > > which matches a-z, A-Z, 0-9, dot or dash. This is how it works > everywhere else. The rule is 'if you want to match a dash, put it > at the very beginning or very end of your character class' > > I can't see any particular reason to outlaw this practice... I suggest outlawing unescaped '-'... I don't like opaque regex like the following two 'capacitors': /[--\\--]/ /[-----\\-----]/ Gis, Josef 'Jupp' Schugt