public abstract class RegEx extends AnchorBean<RegEx>
It should always define at least one group (i.e. using parentheses).
Constructor and Description |
---|
RegEx() |
Modifier and Type | Method and Description |
---|---|
boolean |
hasMatch(String string)
Returns a boolean whether the regular-expression successfully matches a string or not.
|
abstract Optional<String[]> |
match(String string)
Returns an array of string components it matches successfully, or
Optional.empty() if
it cannot match. |
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public abstract Optional<String[]> match(String string)
Optional.empty()
if
it cannot match.string
- string to match against the regular-expression.Optional.empty()
if no match is possible.public boolean hasMatch(String string)
string
- string to match against the regular-expression.Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.