1
I have the following code:
final String msgRegex = "Produto [a-Z0-9À-ú, ]*";
final String msg = "Produto Soja";
if (msg.equals(msgRegex)) {
System.out.println("Verdadeiro");
} else {
System.out.println("Falso");
}
In this case it’s as if he disregarded the regex
that is in msgRegex. How do I validate it by returning true in equals?
Show, thank you very much.
– Roknauta