Reputation: 43843
In java, you can text a regex by doing
"mystring".matches("myregex")
But is there a certain regex you can use, that will make matches
function evaluate to a false
? It needs to work for all cases (i.e. no matter what string you test it with).
Thanks.
Upvotes: 2
Views: 177
Reputation: 2535
I don't know why you would need this, but this should do the trick
"mystring".matches("(?!)")
Upvotes: 6