[TYPO3-core] RFC: #9336 Enable ascii for parsefunc-short replacement

Oliver Hader oliver at typo3.org
Fri Sep 12 12:05:31 CEST 2008


Oliver Hader schrieb:
> Example:
> 10 = TEXT
> 10 {
>   field = bodytext
>   stdWrap.strReplace {
>     search.char = 32
>     replace = %20
>   }
>   parseFunc {
>     ...
>   }
> }
> 
> 20 = TEXT
> 20 {
>   field = bodytext
>   stdWrap.pregReplace {
>     search = (cat|dog|tiger)
>     replace = animal
>     modifier = 1
>   }
>   parseFunc {
>     ...
>   }
> }

Or as addition a combined way to perform more than one replacement:

10 = TEXT
10 {
   field = bodytext
   stdWrap.replacement {
     10 {
       search.char = 32
       replace = %20
     }
     20 {
       search = oldValue
       replace = newValue
     }
     30 {
       search = (cat|dog|tiger)
       replace = animal
       // regExp could be "1" for "yes, use preg_replace" or a modifier
       regExp = i
     }
   }
   parseFunc {
     ...
   }
}

The indexes 10, 20, 30 are just for setting an order on the execution of 
the replacement. Each subkey "search", "replace" and "regExp" has again 
stdWrap functionality.

olly
-- 
Oliver Hader
TYPO3 4.3 Release Manager


More information about the TYPO3-team-core mailing list