in reply to regexp with mismatches

I'm not sure where you're trying to go with your regex for "multiple repetitions with variable length", (that is, it's not clear what sorts of string sets you want to match), but one alternative for the initial case is a two-step test, where the second step uses tr///:
if ( /ABC(...).E/ and 2 <= ( $1 =~ tr/D// )) { # get here when the captured region contains 2 or 3 D's }
I think this sort of approach would scale reasonably well for more complicated cases: just include more captures in the initial regex match for the regions that need to pass a second condition, and add more tests using tr/// on each capture -- it might look like this (if this is the direction you're heading towards):
if ( /D (.{3}) [A-Z]{3,15} (\d{6,8}) [^D]{2}/x and 2 <= ( $1 =~ tr/F//) # first capture contains at least two F +'s and 3 <= ( $2 =~ tr/1//) # second capture contains at least three + 1's ) { # get here when all conditions are met }
(Note that tr/// does not affect the contents of capture variables $1, $2, etc.)

i think this also helps keep the logic more coherent and maintainable as code. Loading too many diverse conditions into a single, exhaustive regex can get cumbersome.