public class WildcardMatcher extends Object
| Constructor and Description |
|---|
WildcardMatcher() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
match(String str,
String wildcardMatcher)
Matches fully-qualified names that use dot (.) as the name boundary.
|
public static boolean match(String str, String wildcardMatcher)
A '?' matches a single character. A '*' matches one or more characters within a name boundary. A '**' matches one or more characters across name boundaries.
Examples:
wildcardMatch("eve", "eve*") --> true
wildcardMatch("alice.bob.eve", "a*.bob.eve") --> true
wildcardMatch("alice.bob.eve", "a*.bob.e*") --> true
wildcardMatch("alice.bob.eve", "a*") --> false
wildcardMatch("alice.bob.eve", "a**") --> true
wildcardMatch("alice.bob.eve", "alice.bob*") --> false
wildcardMatch("alice.bob.eve", "alice.bob**") --> true
str - the string to match onwildcardMatcher - the wildcard string to match againstCopyright © 2025 Confluent, Inc.. All rights reserved.