On Mon, 2005-07-25 at 21:45 +0200, Gregory Machin wrote: [snip] > But i cant seem to get my brian around the regex part ... [snip] So don't use one. Instead, write a filter looks for <?php and sets a $found flag. The $found flag is set to zero once it encounters the next ?>. The filter outputs everything unless $found equals non-zero.