public class GlobbingPathHelper
extends java.lang.Object
Constructor and Description |
---|
GlobbingPathHelper() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
globPathAsRegex(java.lang.String pathWithGlobs)
Converts the provided path containing glob characters
*
and ** into a regular expression. |
public static java.lang.String globPathAsRegex(java.lang.String pathWithGlobs)
*
and **
into a regular expression. The definition matches
that of the GlobbingPathFilter with the addition that this conversion
also supports sub-paths which do not start with a /
.
The rules are:
**
matches /foo
and bar
/**
matches /foo
but not bar
**
matches zero or any number of path elements **
matches anything not ending with a /
*
matches anything except /
?
is not a special character\Q...\E
pairspathWithGlobs
- path that can contain * and **GlobbingPathFilter
Copyright © 2010 - 2020 Adobe. All Rights Reserved