The one-level wildcard (-*-) matches only the defined level starting at the location of the one-level wildcard to the next delimiter boundary. The “defined level” refers to the area between delimiter boundaries. Many of the rules that apply to the multi—level wildcard also apply to the one-level wildcard.
The following list summarizes the behavior of hyphen-asterisk-hyphen (-*-) as a wildcard:
Matches zero or more occurrences of any character except for the forward slash and the question mark (?).
Does not span across multiple levels in a URL.
Cannot be escaped. Therefore, the backslash character (\) or other characters cannot be used to escape the hyphen-asterisk-hyphen, as such \-*-.
The following examples show the one-level wildcard when used with the forward slash (/) as the delimiter character:
The one-level wildcard (-*-) matches zero or more characters (except for the forward slash and the question mark) in the resource name. For example, ...B-examp/-*- doesn't match ...B-examp/b/c or ...B-examp/a?b=1
Multiple consecutive forward slash characters (/) do not match with a single forward slash character (/). For example, ...B-examp/-*-/A-examp doesn't match ...B-examp/A-examp.
Any number of trailing forward slash characters (/) are not recognized as part of the resource name. For example, ...B-examp/ and ...B-examp// are treated the same as ...B-examp.
Pattern |
Matches |
Does Not Match |
---|---|---|
http://A-examp.com:8080/b/-*- |
http://A-examp.com:8080/b http://A-examp.com:8080/b/ http://A-examp.com:8080/b/cd/ |
http://A-examp.com:8080/b/c?d=e http://A-examp.com:8080/b/cd/e http://A-examp.com:8090/b/ |
http://A-examp.com:8080/b/-*-/f |
http://A-examp.com:8080/b/c/f http://A-examp.com:8080/b/cde/f |
http://A-examp.com:8080/b/c/e/f http://A-examp.com:8080/f/ |
http://A-examp.com:8080/b/c-*-/f |
http://A-examp.com:8080/b/cde/f http://A-examp.com:8080/b/cd/f http://A-examp.com:8080/b/c/f |
http://A-examp.com:8080/b/c/e/f http://A-examp.com:8080/b/c/ http://A-examp.com:8080/b/c/fg |