Which is built into String as well as a shortcut:
Ireneusz Kordal wrote:
mic ta wrote:I meant if an upper-case character is found than this character should convert to lower case, but I understand now that I am looking for non character and therefore I solve the problem with equalsIgnoreCase.
Converting to lower case is best done via the toLowerCase() method, instead of the regex related replaceAll() method. Regex is not a cure all.
mic ta wrote:EDIT: Is it possible that the regular expression convert also the match to lower case?
To answer your question.... Yes. with regex, it is possible, but not with the replaceAll() method, as it is too high level (actually, you can, but doing 26 different passes for replacements is silly).
To use regex, to convert to lower case, you will have to use the find(), appendReplacement(), and appendTail() methods.