.*\.(com|org|edu|us|cn|ca|de|mus|gov) another common case: (a|b|c|...|z)(0|1|2|...|9)(a|e|i|o|u) When your "or"s all just are a single char, you can use the character-set notation: the pattern [abcdef...z][0123456789][aeiouAEIOU] matches "a4e" "z9A" but not "ab01A" - square-brackets are character-sets: they match EXACTLY ONE character. Within square-brackets, "-" can be used for a range of characters: [a-z][0-9][aeiouAEIOU] is a pattern equivalent to above. Note: "any roman letter upper or lower case" is [a-zA-Z] -- NOT [A-z] [A-z] includes other letters between 'Z' and 'a' -- as per an ascii chart - finally: some character-sets are so common, they have additonal shortcuts: [A-Za-z] is also [[:alpha:]] is also \w is also \p{L}