in reply to Re^3: This regexp made simpler
in thread This regexp made simpler

But doesn't that still give you an undefined  $1 that needs to be 'fixed' sooner or later?

>perl -wMstrict -le "'AZ' =~ /A( [^Z]*)?Z/; print qq{'$1'}; " Use of uninitialized value $1 in concatenation (.) or string at ... ''

'Elegance', admittedly protean, would yet seem to require avoiding this extra step.