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

Contrary to my interpretation of the requirements of the OP, both your regex and the updated regex of rovf's OP allow a 'Z' between the first 'A' and the final 'Z', and also still need to have an undefined  $1 rationalized to an empty string.