<snip>
Hi :),

i'm looking for a function to remove multiple dynamic parts
of a string, there are only the start and end strings given

(remove all between string A and string B)

got somebody a working procedure for that?


regards
</snip>

a start of a procedure I have

$stringA = "string A";
$stringB = "string B";
$string = "remove all between string A and string B";


$pattern = "/$stringA.\w*.$stringB/";
$replacement = "$stringA$stringB";
echo preg_replace($pattern, $replacement, $string);




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to