A factory class for regex functions.
author |
Hans Lellelid hans@xmpl.org |
---|---|
package |
phing.util.regexp |
version |
$Id: ad952b68b1876f57f4854621cfed990abb7fa310 $ |
__construct(string $engineType = 'preg')
throws | |
---|---|
string
getGroup(integer $idx) : string
integer
string
specified group or NULL if group is not set.
getGroups() : array
array
Matched groups
getIgnoreCase() : 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
throws |
---|
string
The subject, on which to perform matches.
boolean
Whether or not pattern matches subject string passed.
replace(string $subject) : string
throws |
---|
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
setLimit(integer $limit)
integer
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.
groups : array
var |
---|
array
pattern : string
var |
---|
string
replace : string
var |
---|
string