# Matches if the string consists entirely of # a sequence of 1 or more lowercase letters, # optionally followed by a newline $str =~ /^[a-z]+$/