Swat/SwatString.php
private static function stripEntities(&$string, &$matches)
    {
        $reg_exp = '/&#?[a-z0-9]*?;/su';

        preg_match_all($reg_exp, $string, $matches, PREG_OFFSET_CAPTURE);

        $string = preg_replace($reg_exp, '*', $string);
    }
private static function stripEntities(&$string, &$matches)
    {
        $reg_exp = '/&#?[a-z0-9]*?;/su';

        preg_match_all($reg_exp, $string, $matches, PREG_OFFSET_CAPTURE);

        $string = preg_replace($reg_exp, '*', $string);
    }
private static function stripEntities ( & $ string , & $ matches ) { $ reg_exp = '/&#?[a-z0-9]*?;/su' ; preg_match_all ( $ reg_exp , $ string , $ matches , PREG_OFFSET_CAPTURE ) ; $ string = preg_replace ( $ reg_exp , '*' , $ string ) ; }
Strips entities from a string remembering their positions

Stripped entities are replaces with a single special character. All
parameters are passed by reference and nothing is returned by this
function.

@param string $string the string to strip entites from.
@param array $matches the array to store matches in.
Strips entities from a string remembering their positions