Hallo Tom1tk,
Ich habe folgenden String und möchte, sofern &PHPSESSID=... drinsteht eben diesen löschen.
versuchs mal mit:
$str = preg_replace("/[?]?[&]?(PHPSESSID=)[0-9a-f]*/",'',$str)
das funktioniert auf jeden Fall, besser ist vielleicht:
$str = preg_replace("/(?|&)PHPSESSID=[0-9a-f]*/",'',$str)
(allerdings ungetestet)
Grüße aus Nürnberg
Tobias
--
Selfcode: sh:( fo:) ch:? rl:( br:< n4:& ie:% mo:| va:) de:] zu:) fl:( ss:| ls:[ js:|
Selfcode: sh:( fo:) ch:? rl:( br:< n4:& ie:% mo:| va:) de:] zu:) fl:( ss:| ls:[ js:|