Ok, i got this so far ...
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Testing2 {
public static void main(String[] args) {
Pattern p = Pattern.compile("[wati]");
String text = "water";
Matcher m = p.matcher(text);
if (m.find()) {
System.out.print("Found !");
}
}
}
With that code i got a match, but i ONLY want to find a match if the String matches the EXACTS characters in the Pattern ...
in this case i got, 'w' 'a' 't' 'i', 'w' 'a' 't', are in water, but 'i' NOT, so i don't want to have a match !
i don't know how to acomplish this :(
hope you can help me, thanks in advance :D