in reply to Recognizing duplicates
note that the dot metacharacter matches any character (except newline, unless the /s regex switch is used). if, instead, you want to check for the duplication of any letter, i.e., an alpha character, you might try /(\w).*\1/ or /([a-zA-Z]).*\1/.