Pattern represents compiled regular expression.
Constructor
Creates regular expression.
| Parameters |
pattern -
Pattern string
flags -
String containing zero or more of
Multiline, Ignore case, eXtended
|
| Throws |
MalformedPattern -
If pattern is invalid
|
Methods
Checks is given string (partially) matches this pattern
Finds all occurences from given string matching this pattern.
Checks is given string matches this pattern
Splits given text to pieces according to this pattern.
Substitutes regions from string matching this pattern with
given substitution.
| Parameters |
Amount -
of occurences to subsitutute, if omitted all occurences
are replaced
|
Substitutes first region from string matching this pattern.