A factory class for regex functions.
| author | Hans Lellelid |
|---|---|
| package | phing.util.regexp |
| version | $Id$ |
__construct($engineType)
getGroup(integer $idx) : string
integer
stringspecified group or NULL if group is not set.getGroups() : array
arrayMatched groupsgetIgnoreCase() : boolean
booleangetModifiers() : string
Subsequent call to engines getModifiers() filters out duplicates i.e. if i is provided in $mods, and setIgnoreCase(true), "i" modifier would be included only once
stringgetMultiline() : boolean
booleangetPattern() : string
stringThe pattern to match on.getReplace() : string
stringThe pattern to replace matches with.matches(string $subject) : boolean
stringThe subject, on which to perform matches.
booleanWhether or not pattern matches subject string passed.replace(string $subject) : string
stringText on which to perform replacement.
stringsubject after replacement has been performed.setIgnoreCase(boolean $bit)
(default is false -- i.e. case sensisitive)
boolean
setModifiers(string $mods) : void
stringModifiers to be applied to a given regex
setMultiline(boolean $bit)
boolean
setPattern(string $pat) : void
stringThe pattern to match on.
setReplace(string $rep) : void
stringThe pattern to replace matches with.
$engine : \RegexpEngine
'preg' or 'ereg';
$groups : array
$pattern : string
$replace : string