I want to match a string containing slashes in Java. I have the following code:
String exclude = "some/class/in/package/*.class";
String className = "some/class/in/package/TheClass.class";
boolean value = className.matches(exclude);
System.out.println(value);
>false
Can anyone help me fix this?
Aucun commentaire:
Enregistrer un commentaire