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

Ah yes, missed that. Maybe this improved version.

printf( "\n$_: " ), m[A( [^Z]*|)Z] and print "'$1'" for 'AZ', 'A SOMETHING Z', 'ASOMETHINGZ', 'A Z', 'A Z';; AZ: '' A SOMETHING Z: ' SOMETHING ' ASOMETHINGZ: A Z: ' ' A Z: ' '

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy