Feature #42287
closed
stdWrap replacement: add optionSplit-support
Added by Stefan Neufeind about 12 years ago.
Updated about 7 years ago.
Description
With optionSplit-support for the "replace"-parameter it would be possible to do all nice optionSplit-stuff like replacing the first/middle/last occurences differently.
- Status changed from New to Under Review
This is a documentation
The ``useOptionSplitReplace`` boolean property of ``replacement`` allows to use optionSplit for the ``replace`` property.
This works for both normal and regexp replacements.
Usage examples are included below
# There1is2a3cat,3a3dog3and3a3tiger3in3da3hood!3Yeah!
10 = TEXT
10.value = There_is_a_cat,_a_dog_and_a_tiger_in_da_hood!_Yeah!
10.replacement.10 {
search = _
replace = 1 || 2 || 3
useOptionSplitReplace = 1
}
# There is a tiny cat, a midsized dog and a big tiger in da hood! Yeah!
20 = TEXT
20.value = There is a cat, a dog and a tiger in da hood! Yeah!
20.replacement.10 {
search = #(a) (Cat|Dog|Tiger)#i
replace = ${1} tiny ${2} || ${1} midsized ${2} || ${1} big ${2}
useOptionSplitReplace = 1
useRegExp = 1
}
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- TYPO3 Version changed from 6.0 to 6.2
- Target version set to 6.2.0
- Status changed from Resolved to Closed
Also available in: Atom
PDF