I need to check strings to see if they only contain "Nonalphanumeric characters". basically I can have a string that is "!!!hi" and this would be okay, because it contains alphanumeric characters as well as non alphanumeric, but a line that is just "@@#!" this would be deleted. It seems like I would need some type of "Contains" that's not the normal java contains.
Here is what I have tried.
if(line.matches("[^a-zA-Z\\d\\s:]")){
line = line;
} else {
line = line.replace(line, "");
}