A factory class for regex functions.
author | Hans Lellelid |
---|---|
package | phing.util.regexp |
version | $Id$ |
__construct($engineType)
getGroup(integer $idx) : string
integer
string
specified group or NULL if group is not set.getGroups() : array
array
Matched groupsgetIgnoreCase() : boolean
boolean
getModifiers() : 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
string
getMultiline() : boolean
boolean
getPattern() : string
string
The pattern to match on.getReplace() : string
string
The pattern to replace matches with.matches(string $subject) : boolean
string
The subject, on which to perform matches.
boolean
Whether or not pattern matches subject string passed.replace(string $subject) : string
string
Text on which to perform replacement.
string
subject after replacement has been performed.setIgnoreCase(boolean $bit)
(default is false -- i.e. case sensisitive)
boolean
setModifiers(string $mods) : void
string
Modifiers to be applied to a given regex
setMultiline(boolean $bit)
boolean
setPattern(string $pat) : void
string
The pattern to match on.
setReplace(string $rep) : void
string
The pattern to replace matches with.
$engine : \RegexpEngine
'preg' or 'ereg';
$groups : array
$pattern : string
$replace : string