Mailinglisten-Archive |
Sebastian Mendel wrote:
> Christian Heimerl wrote:
>> Sebastian Mendel wrote:
>>> Christian Heimerl wrote:
>>>> OUTPUT:
>>>> {LANG_TEXT1}
>>>> da sollte aber eigentlich:
>>>> {LANG_TEXT1}{EDIT_LANG_TEXT1}
>>>> stehen!!!
>>> probier mal mit 'u'
>>> preg_replace( "/(>[^<]*\{(LANG_.*?)\})/u", "$1{EDIT_$2}", $x );
>>> preg_replace( "/(<[^>]*\{(LANG_.*?)\}.*?>)/u", "$1{EDIT_$2}",
>>> $x );
>>
>> hmm ne, das haut nicht hin, was hat das mit utf8 zu tun??? *
>> wunder*
> naja, ich meinte auch 'U'
bringt aber leider auch nichts :(
<?php
$x = '{LANG_TEXT2}';
$x = preg_replace( "/(>[^<]*\{(LANG_.*?)\})/U", "$1{EDIT_$2}", $x );
$x = preg_replace( "/(<[^>]*\{(LANG_.*?)\}.*?>)/U", "$1{EDIT_$2}", $x );
echo $x;
?>
rauskommen müsste:
{LANG_TEXT2}{EDIT_LANG_TEXT2}
tuts aber nicht
php::bar PHP Wiki - Listenarchive