I have a variable length string, I just want to detect whether this string contains several characters. For example:
"sadsdd$sss^dee~"
I want to detect whether this string contains ANY of the following: $ ^ ~. How can I do that using Java string.matches?
"sadsdd$sss^dee~".matches("[^+$+~+]");
$^~characters or one is enough?