Project

General

Profile

Feature #19347 » 0009373_documentation.txt

Administrator Admin, 2009-05-28 18:13

 
-----------------
[tsref:->stdWrap]
-----------------
Add new property before "csConv":

Property:
replacement

Data type:
Numeric array of replacement actions / -> replacementAction

Description:
Performs an ordered search/replace on the current content with the possibility to use regular expressions.

Example:
20 = TEXT
20 {
value = There_is_a_cat,_a_dog_and_a_tiger_in_da_hood!_Yeah!
stdWrap.replacement {
10.search = _
10.replace.char = 32
20.search = in da hood
20.replace = around the block
30.search = #a (Cat|Dog|Tiger)#i
30.replace = an animal
30.useRegExp = 1
}
}

---------------------------
[tsref:->replacementAction]
---------------------------
Add this new type.

Property: Data type: Description:
search string / stdWrap Defines the needle to be used to search in the given content. This can also be used as regular expression.
Examples:
* 10.search = needle
* 20.search = /(cat|dog)/i
replace string / stdWrap Defines the replacement to be used to exchange a found needle. This can also be used as regular expression.
Examples:
* 10.replace = replaced
* 20.replace = \1 was replaced
useRegExp boolean / stdWrap Defines whether preg_replace() should be used instead of str_replace().
(3-3/3)