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.


Field Summary
 
Fields inherited from class websphinx.Pattern
groups
 
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 websphinx.Regexp
getFieldNames, match
 
Methods inherited from class websphinx.Pattern
allMatches, allMatches, found, found, oneMatch, oneMatch
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Wildcard

public Wildcard(java.lang.String pattern)
Method Detail

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