- preg_replace: documentation ( source)
- mb_ereg_replace: documentation ( source)
<?php
$regex = '/(((?!a).)*)*a\\{/';
$test_string = 'AAAAAAAAAAAAAA{AA';
echo "1:".preg_replace($regex,'WORKED',$test_string)."\n";
echo "1:".preg_replace($regex.'u','WORKED',$test_string)."\n";
echo "2:".mb_ereg_replace($regex,'WORKED',$test_string);