Modifier and Type | Method and Description |
---|---|
static String |
toRegex(String glob,
char separator)
Converts the given glob pattern into a regular expression.
|
static String |
toRegex(String glob,
String separator)
Converts the given glob pattern into a regular expression.
|
public static String toRegex(String glob, String separator)
glob
- the glob pattern to convertseparator
- the path separator characterglob
PatternSyntaxException
- if the pattern is invalidIllegalArgumentException
- if separator
has multiple
characterspublic static String toRegex(String glob, char separator)
glob
- the glob pattern to convertseparator
- the path separator characterglob
PatternSyntaxException
- if the pattern is invalid