$text = preg_replace('/action="*"/','action="my.php"',$text);
$text = preg_replace('#action?=?"*"#', 'action="my.php"', $text);