regex check if string contains any letters java code example Example: check if a string contains a character java string.indexOf('a')