Hi

I would change

Code:
regular_expr:= '[ABCDEFGHIJKLMNOPQRSTUVWXYZ]';
to
regular_expr:= '[A-Z]';
Code:
and
if regexp_instr('password',regular_expr) < 1
to
IF REGEXP_INSTR(password,regular_expr)>0
you should understand whats going on in that regex your code failed because instead of comparing variable value in if condition both the times you compared literal strings

regards
Hrishy