Saluton! * Brian Candler <B.Candler / pobox.com>; 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