|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Interface for regexp utility bean implementations. An instance of this
should be obtained through a RegexpUtilFactory
.
RegexpUtilFactory
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. |
Method Detail |
public boolean applyRegexp(String patternStr, String valueStr, boolean ignoreCase, boolean singleLine)
patternStr
- 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
patternStr
- 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.BuildException
public String getGroupValue(int group)
applyRegexp(java.lang.String, java.lang.String, boolean, boolean)
, as specified by a regexp 'group', ie (..) notation.
group
- 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 |