ReplaceRegExp is a directory based task for replacing the occurrence of a given regular expression with a substitution pattern in a selected file or set of files.
<replaceregexp file="${src}/build.properties"
match="OldProperty=(.*)"
replace="NewProperty=\1"
byline="true"/>
author |
Jonathan Bond-Caron jbondc@openmv.com |
---|---|
version |
$Id: 40ce7eb361b218c537c5f99f1bc904bdc4c21c65 $ |
package |
phing.tasks.system |
link |
http://ant.apache.org/manual/OptionalTasks/replaceregexp.html |
addFileSet(\FileSet $fs) : void
getDescription() : string
string
The text description of the task
getLocation() : \Location
getOwningTarget() : \Target
getProject() : \Project
getRegisterSlot(string $slotName)
string
getRuntimeConfigurableWrapper() : \RuntimeConfigurable
getTaskName() : string
string
Name of this task
getTaskType() : string
string
The type of this task (XML Tag)
init()
Should throw a BuildException if something goes wrong with the build
This is abstract here, but may not be overloaded by subclasses.
throws | |
---|---|
log(string $msg, integer $level = \Project::MSG_INFO)
string
The message to be logged.
integer
The message's priority at this message should have
main()
Should throw a BuildException if someting goes wrong with the build
This is abstract here. Must be overloaded by real tasks.
maybeConfigure()
perform()
setDescription(string $desc)
string
The text describing the task
setFile(string $path)
string
setFlags(string $flags)
string
setLocation(\Location $location)
setMatch(string $regexp)
string
setOwningTarget(\Target $target)
setProject(\Project $project)
setReplace(string $string)
string
setRuntimeConfigurableWrapper(\RuntimeConfigurable $wrapper)
setTaskName(string $name) : string
string
string
A string representing the name of this task for log
setTaskType( $name)
file :
filesets :
description : string
var |
---|
string
taskType : string
var |
---|
string
taskName : string
var |
---|
string
project : \Project