com.stevenrbrandt.ubiq2.v4.pattwo
Class Pattern
java.lang.Object
com.stevenrbrandt.ubiq2.v4.pattwo.Pattern
public class Pattern
- extends java.lang.Object
Very similar in function to java.util.regex.Pattern.
Noteable differences:
- Designed to use low memory. Should never result in a stack
overflow. This means, however, that certain complex patterns
could take a very long time to match.
- The set of character entities is more limited. Than what Sun
provides. You can, however, add your own using the addEntity method.
- (?<=X) and (?<!X) are not supported.
- requireEnd() is missing and will not be supplied. I think it's
purpose is to support matching on a stream. I offer a different
way to do this (see the Loader).
- Various methods missing -- these may trickle in.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Pattern
public Pattern()
addEntity
public static void addEntity(Entity e)
matcher
public Matcher matcher(java.lang.CharSequence s)
matcher
public Matcher matcher(CharStream s)
- Used for matching against an IOStream, etc.
See Loader and the LoadTest example.
matcher
public Matcher matcher(java.io.Reader r)
compile
public static Pattern compile(java.lang.String s)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
toString
public static java.lang.String toString(java.util.Vector<com.stevenrbrandt.ubiq2.v4.pattwo.PatElem> elems)
toString
public static java.lang.String toString(com.stevenrbrandt.ubiq2.v4.pattwo.PatElem[] elems)