/[A-Z]/ and /[a-z]/ and /[0-9]/ and /[;,.#!\$]/ is the same as ( using (A and B) == not (not A or not B) ) not( !/[A-Z]/ or !/[a-z]/ or !/[0-9]/ or !/[;,.#!\$]/ is the same as not( /^[^A-Z]*$/ or /^[^a-z]*$/ or /^[^0-9]*$/ or /^[^;,.#!\$]*$/) is the same as not( /^[^A-Z]*$|^[^a-z]*$|^[^0-9]*$|^[^;,.#!\$]*$/)