<text charset="charset" delimiter="delimiter"> wrapped body </text>
Name | Required | Default | Description |
---|---|---|---|
charset | no | default configuration's charset | Charset used if body is converted from binary to text value. |
delimiter | no | new line character | Delimiter string used to separate items when concatenating them into single string. |
<var-def name="digits"> <while condition="${i.toInt() != 10}" index="i"> <template>${i}</template> </while> </var-def> <file action="write" path="/test/replaced23.txt"> <regexp replace="true"> <regexp-pattern>(.*)(2.*3)(.*)</regexp-pattern> <regexp-source> <text> <var name="digits"/> </text> </regexp-source> <regexp-result> <template>${_1}here were 2 and 3${_3}</template> </regexp-result> </regexp> </file>
Variable named digits is defined using the while processor, producing sequence of 9 values. Next, the regexpr processor is invoked in order to do search-replace on variable value. text processor is used to concatenate all digit values into single one. Without text processor, regular expression search would be applied to each item in the list (every digit) and that way no replace would occurr, because there is no sequence "2*3".