Class RE {Java} derived from: REToken

Documentation
* RE provides the user interface for compiling and matching regular
* expressions.
* <P>
* A regular expression object (class RE) is compiled by constructing it
* from a String, StringBuffer or character array, with optional
* compilation flags (below)
* and an optional syntax specification (see RESyntax; if not specified,
* <code>RESyntax.RE_SYNTAX_PERL5</code> is used).
* <P>
* Various methods attempt to match input text against a compiled
* regular expression. These methods are:
* <LI><code>isMatch</code>: returns true if the input text in its entirety
* matches the regular expression pattern.
* <LI><code>getMatch</code>: returns the first match found in the input text,
* or null if no match is found.
* <LI><code>getAllMatches</code>: returns an array of all non-overlapping
* matches found in the input text. If no matches are found, the array is
* zero-length.
* <LI><code>substitute</code>: substitute the first occurence of the pattern
* in the input text with a replacement string (which may include
* metacharacters $0-$9, see REMatch.substituteInto).
* <LI><code>substituteAll</code>: same as above, but repeat for each match
* before returning.
* <LI><code>getMatchEnumeration</code>: returns an REMatchEnumeration object
* that allows iteration over the matches (see REMatchEnumeration for some
* reasons why you may want to do this instead of using <code>getAllMatches</code>.
* <P>
* These methods all have similar argument lists. The input can be a
* String, a character array, a StringBuffer or an InputStream of some sort.
* Note that
* when using an InputStream, the stream read position cannot be guaranteed
* after attempting a match (this is not a bug, but a consequence of the way
* regular expressions work). Using an REMatchEnumeration can eliminate most
* positioning problems.
* <P>
* The optional index argument specifies the offset from the beginning of the
* text at which the search should start (see the descriptions of some of
* the execution flags for how this can affect positional pattern operators).
* For an InputStream, this means an offset from the current read position,
* so subsequent calls with the same index argument on an InputStream will not
* necessarily be accessing the same position on the stream, whereas repeated
* searches at a given index in a fixed string will return consistent
* results.
* <P>
* You can optionally affect the execution environment by using a
* combination of execution flags (constants listed below).
*
* @author <A HREF="mailto:wes@cacas.org">Wes Biggs</A>
* @version 1.0.8, 21 March 1999


Parent PackageregexpAbstractNo
Export ControlPublicAccessLink Class forNone
Class KindNormalClassCardinalityn
Space ConcurrencySequential
PersistenceNo  


Assigned ComponentsRE


Operations
NameSignatureClass
versionString version ()RE
RE RE (Object pattern)RE
RE RE (Object pattern, int cflags)RE
RE RE (Object pattern, int cflags, RESyntax syntax)RE
RE RE (REToken f_first, REToken f_last, int f_subs, int f_subIndex)RE
RE RE (Object patternObj, int cflags, RESyntax syntax, int myIndex, int nextSub)RE
getCharUnitint getCharUnit (char[] input, int index, CharUnit unit)RE
isMatchboolean isMatch (Object input)RE
isMatchboolean isMatch (Object input, int index)RE
isMatchboolean isMatch (Object input, int index, int eflags)RE
isMatchImplboolean isMatchImpl (CharIndexed input, int index, int eflags)RE
getNumSubsint getNumSubs ()RE
setUnclevoid setUncle (REToken f_uncle)RE
chainboolean chain (REToken f_next)RE
getMinimumLengthint getMinimumLength ()RE
getAllMatchesREMatch[] getAllMatches (Object input)RE
getAllMatchesREMatch[] getAllMatches (Object input, int index)RE
getAllMatchesREMatch[] getAllMatches (Object input, int index, int eflags)RE
getAllMatchesImplREMatch[] getAllMatchesImpl (CharIndexed input, int index, int eflags)RE
matchint[] match (CharIndexed input, int index, int eflags, REMatch mymatch)RE
getMatchREMatch getMatch (Object input)RE
getMatchREMatch getMatch (Object input, int index)RE
getMatchREMatch getMatch (Object input, int index, int eflags)RE
getMatchREMatch getMatch (Object input, int index, int eflags, StringBuffer buffer)RE
getMatchImplREMatch getMatchImpl (CharIndexed input, int index, int eflags, StringBuffer buffer)RE
getMatchEnumerationREMatchEnumeration getMatchEnumeration (Object input)RE
getMatchEnumerationREMatchEnumeration getMatchEnumeration (Object input, int index)RE
getMatchEnumerationREMatchEnumeration getMatchEnumeration (Object input, int index, int eflags)RE
substituteString substitute (Object input, String replace)RE
substituteString substitute (Object input, String replace, int index)RE
substituteString substitute (Object input, String replace, int index, int eflags)RE
substituteImplString substituteImpl (CharIndexed input, String replace, int index, int eflags)RE
substituteAllString substituteAll (Object input, String replace)RE
substituteAllString substituteAll (Object input, String replace, int index)RE
substituteAllString substituteAll (Object input, String replace, int index, int eflags)RE
substituteAllImplString substituteAllImpl (CharIndexed input, String replace, int index, int eflags)RE
addTokenvoid addToken (REToken next)RE
setRepeatedREToken setRepeated (REToken current, int min, int max, int index)RE
getPosixSetint getPosixSet (char[] pattern, int index, StringBuffer buf)RE
getMinMaxint getMinMax (char[] input, int index, IntPair minMax, RESyntax syntax)RE
toStringString toString ()RE
dumpvoid dump (StringBuffer os)RE
makeCharIndexedCharIndexed makeCharIndexed (Object input, int index)RE
REToken REToken (int f_subIndex)REToken
getMinimumLengthint getMinimumLength ()REToken
setUnclevoid setUncle (REToken f_uncle)REToken
matchint[] match (CharIndexed input, int index, int eflags, REMatch mymatch)REToken
nextint[] next (CharIndexed input, int index, int eflags, REMatch mymatch)REToken
chainboolean chain (REToken next)REToken
dumpvoid dump (StringBuffer os)REToken
dumpAllvoid dumpAll (StringBuffer os)REToken


Attributes
NameClassTypeInitial Value
m_numSubsREint 
REG_ICASEREint2
REG_DOT_NEWLINEREint4
REG_MULTILINEREint8
REG_NOTBOLREint16
REG_NOTEOLREint32
REG_ANCHORINDEXREint64
m_subIndexRETokenint 


Associations
NameMy RoleMy ClassOther RoleOther Element
--Not Named----Not Named--REs_versionString
--Not Named----Not Named--REfirstTokenREToken
--Not Named----Not Named--RElastTokenREToken
--Not Named--m_exprRE--Not Named--REFilterInputStream
--Not Named--m_exprRE--Not Named--REMatchEnumeration
--Not Named----Not Named--REfirstTokenREToken
--Not Named----Not Named--RElastTokenREToken
--Not Named----Not Named--RETokennewlineString
--Not Named----Not Named--RETokenm_nextREToken
--Not Named----Not Named--RETokenm_uncleREToken
--Not Named--tokenREToken--Not Named--RETokenRepeated


Generalization Relationships
NameClassSupplier
--Not Named--REREToken



Property Settings

Java
GenerateFinalizerFalseGenerateStaticInitializerFalse
GenerateInstanceInitializerFalseGenerateDefaultConstructorFalse
FinalFalseStaticFalse
ConstructorIspublicCtor_Setpublic, protected, private, package
GenerateCodeTrueDisableAutoSyncFalse


Data Modeler
dmItemFalseDMName 
IsTableFalseIsViewFalse
Synonymns TableSpace 
SourceId SourceType 
SelectClause IsUpdatableFalse
CheckOption0