1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-15 05:45:05 -05:00

* allow null parameter

This commit is contained in:
Reinhard Pointner 2014-04-28 04:31:10 +00:00
parent a8e52145f4
commit b315e9e9ea

View File

@ -182,9 +182,12 @@ public class ExpressionFormatMethods {
}
/**
* Find MatchResult that matches the given pattern (case-insensitive)
* Find a matcher that matches the given pattern (case-insensitive)
*/
public static Matcher findMatch(String self, String pattern) {
if (pattern == null)
return null;
Matcher matcher = compile(pattern, CASE_INSENSITIVE | UNICODE_CHARACTER_CLASS).matcher(self);
return matcher.find() ? matcher.reset() : null;
}