$username = <>; print "Yay!\n" if $username =~ /(?! #look ahead . . . ^ #and see if at the start of the string \d+ #we have one or more digits $) #until the end of the string. If not . . . ^ #at the start of the string [[:alpha:]] #allow an alphabetic character [_.-0-9[:alpha:]] #followed by an alphanumeric character, underscore, dot, or dash {0,29} #0 to 29 times $ #to the end of the string /x;