in reply to regular expressions - finding repeats

You may wish to avoid back references.
/(A{5}|B{5}|C{5}|D{5})/
Or for your other case:

/(A{2,5}|B{2,5}|C{2,5}|D{2,4})/

/(A{2,5}|B{2,5}|C{2,5}|D{2,5})/

Update: fixed typo per Nkuvu

Replies are listed 'Best First'.
Re: Re: regular expressions - finding repeats
by Nkuvu (Priest) on Feb 27, 2003 at 03:58 UTC
    Why the D{2,4} on the second? Typo?