|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.forum.nntp.Wildmat
public class Wildmat
A standard regex-like pattern matching standard used throughout the NNTP specification. Wildmat patterns follow the NNTP standard:
The WILDMAT format was first developed by Rich Salz based on the format used in the UNIX "find" command to articulate file names. It was developed to provide a uniform mechanism for matching patterns in the same manner that the UNIX shell matches filenames. Patterns are implicitly anchored at the beginning and end of each string when testing for a match. There are five pattern matching operations other than a strict one-to-one match between the pattern and the source to be checked for a match. The first is an asterisk (*) to match any sequence of zero or more characters. The second is a question mark (?) to match any single character. The third specifies a specific set of characters. The set is specified as a list of characters, or as a range of characters where the beginning and end of the range are separated by a minus (or dash) character, or as any combination of lists and ranges. The dash can also be included in the set as a character it if is the beginning or end of the set. This set is enclosed in square brackets. The close square bracket (]) may be used in a set if it is the first character in the set. The fourth operation is the same as the logical not of the third operation and is specified the same way as the third with the addition of a caret character (^) at the beginning of the test string just inside the open square bracket. The final operation uses the backslash character to invalidate the special meaning of the a open square bracket ([), the asterisk, backslash or the question mark. Two backslashes in sequence will result in the evaluation of the backslash as a character with no special meaning.
Examples
- [^]-] -- matches any single character other than a close square bracket or a minus sign/dash.
- *bdc -- matches any string that ends with the string "bdc" including the string "bdc" (without quotes).
- [0-9a-zA-Z] -- matches any single printable alphanumeric ASCII character.
- a??d -- matches any four character string which begins with a and ends with d.
Constructor Summary | |
---|---|
Wildmat(java.lang.String pattern)
Create a wildmat matcher based on the given match pattern. |
Method Summary | |
---|---|
boolean |
isNot()
Determines if the match results on it's inverse is in the match set. |
boolean |
matches(NewsGroupName name)
Determines if the pattern matches the given name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Wildmat(java.lang.String pattern)
pattern
- the pattern to use for wildmat matching.Method Detail |
---|
public boolean matches(NewsGroupName name)
name
- the name to match.
public boolean isNot()
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |