Pattern.matches(regex, value);
returns false
for the given Parameters:
Regex = [<>:/\\\\|?*] value = This Should /\Match*?
my expectation however is that it should return true
, what am I missing here?
Pattern.matches(regex, value);
returns false
for the given Parameters:
Regex = [<>:/\\\\|?*] value = This Should /\Match*?
my expectation however is that it should return true
, what am I missing here?
behaves in exactly the same way as the expression
Pattern.compile(regex).matcher(input).matches()
and Matcher.matches
:
Attempts to match the entire region against the pattern.
Your regex doesn't match the entire string.