websphinx
Class Wildcard
java.lang.Object
|
+--websphinx.Pattern
|
+--websphinx.Regexp
|
+--websphinx.Wildcard
- All Implemented Interfaces:
- java.io.Serializable
- public class Wildcard
- extends Regexp
Wildcard pattern. Wildcards are similar to sh-style file globbing.
A wildcard pattern is implicitly anchored, meaning that it must match the entire string.
The wildcard operators are:
? matches one arbitrary character
* matches zero or more arbitrary characters
[xyz] matches characters x or y or z
{foo,bar,baz} matches expressions foo or bar or baz
() grouping to extract fields
\ escape one of these special characters
Escape codes (like \n and \t) and Perl5 character classes (like \w and \s) may also be used.
- See Also:
- Serialized Form
Field Summary |
(package private) java.lang.String |
stringRep
|
Constructor Summary |
Wildcard(java.lang.String pattern)
|
Method Summary |
boolean |
equals(java.lang.Object object)
|
static java.lang.String |
escape(java.lang.String s)
|
static void |
main(java.lang.String[] args)
|
static java.lang.String |
toRegexp(java.lang.String wildcard)
|
java.lang.String |
toString()
Return a string representation of the pattern. |
Methods inherited from class java.lang.Object |
, clone, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
stringRep
java.lang.String stringRep
Wildcard
public Wildcard(java.lang.String pattern)
equals
public boolean equals(java.lang.Object object)
- Overrides:
equals
in class Regexp
toRegexp
public static java.lang.String toRegexp(java.lang.String wildcard)
escape
public static java.lang.String escape(java.lang.String s)
toString
public java.lang.String toString()
- Description copied from class:
Pattern
- Return a string representation of the pattern.
- Overrides:
toString
in class Regexp
main
public static void main(java.lang.String[] args)
throws java.lang.Exception