|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.apache.anteater.util.regexp.ORORegexpUtil
A stateful regexp utility bean, implemented with the ORO library.
| Constructor Summary | |
ORORegexpUtil()
|
|
| Method Summary | |
boolean |
applyRegexp(String patternStr,
String valueStr,
boolean ignoreCase,
boolean singleLine)
Applies a regexp pattern to a string, and returns whether the string contained the matched pattern. |
boolean |
applyRegexp(String patternStr,
String valueStr,
boolean ignoreCase,
boolean singleLine,
boolean contains)
Applies a regexp pattern to a string, and returns whether the string, or a part of the string, matched the pattern. |
String |
getGroupValue(int group)
Retrieve part of the string that a regexp was applied to in applyRegexp(java.lang.String, java.lang.String, boolean, boolean), as specified by a regexp 'group', ie (..) notation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ORORegexpUtil()
| Method Detail |
public boolean applyRegexp(String patternStr,
String valueStr,
boolean ignoreCase,
boolean singleLine)
applyRegexp in interface RegexpUtilpatternStr - regexp patternvalueStr - String to try to matchignoreCase - whether pattern ignores casesingleLine - whether '.' matches newline characters in valueStr
public boolean applyRegexp(String patternStr,
String valueStr,
boolean ignoreCase,
boolean singleLine,
boolean contains)
throws org.apache.tools.ant.BuildException
applyRegexp in interface RegexpUtilpatternStr - regexp patternvalueStr - String to try to matchignoreCase - whether pattern ignores casesingleLine - whether '.' matches newline characters in valueStrcontains - Whether to test if the regexp matches a substring, or the
whole string.
org.apache.tools.ant.BuildExceptionpublic String getGroupValue(int group)
applyRegexp(java.lang.String, java.lang.String, boolean, boolean), as specified by a regexp 'group', ie (..) notation.
getGroupValue in interface RegexpUtilgroup - group id to retrieve
applyRegexp(java.lang.String, java.lang.String, boolean, boolean), corresponding to the indicated group, or null
if no groups were specified in the RE.
RuntimeException - If this is called before applyRegexp(java.lang.String, java.lang.String, boolean, boolean).
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||