|
|
@@ -89,10 +89,12 @@ See details in the documentation of the <a href="../CoreTypes/regexp.html#implem |
|
|
|
</tr> |
|
|
|
</table> |
|
|
|
<h3>Examples</h3> |
|
|
|
<pre> <replaceregexp file="${src}/build.properties" |
|
|
|
match="OldProperty=(.*)" |
|
|
|
replace="NewProperty=\1" |
|
|
|
byline="true"/> |
|
|
|
<pre> |
|
|
|
<replaceregexp file="${src}/build.properties" |
|
|
|
match="OldProperty=(.*)" |
|
|
|
replace="NewProperty=\1" |
|
|
|
byline="true" |
|
|
|
/> |
|
|
|
</pre> |
|
|
|
<p>replaces occurrences of the property name "OldProperty" |
|
|
|
with "NewProperty" in a properties file, preserving the existing |
|
|
@@ -122,9 +124,9 @@ value, in the file <code>${src}/build.properties</code></p> |
|
|
|
<regexp pattern="OldProperty=(.*)"/> |
|
|
|
<substitution expression="NewProperty=\1"/> |
|
|
|
<fileset dir="."> |
|
|
|
<includes="*.properties"/> |
|
|
|
<include name="*.properties"/> |
|
|
|
</fileset> |
|
|
|
</replaceregexp> |
|
|
|
</replaceregexp> |
|
|
|
</pre></blockquote> |
|
|
|
<p>replaces occurrences of the property name "OldProperty" |
|
|
|
with "NewProperty" in a properties file, preserving the existing |
|
|
|