|
Posted by Jerry Fleming on 05/10/06 06:09
Hi,
I want to strip part of a string that *doesn't* match a patter. But
preg_replace does the opposite. For example:
$str = 'aa bb';
echo preg_replace('/bb|cc/', '', $str);
where aa is unpredictable, so my pattern can only be bb|cc. The problem
is, how can I replace aa by negating a pattern?
Navigation:
[Reply to this message]
|