Forum Moderators: coopster
This is what I was hoping would work, but it removes everything.
preg_replace("/^admin_.*?\.php$/", "", $file)
$new_name = preg_replace("/^admin_(.+)\.php$/", "\\1", $file);
You have to group the part you want to keep and add it to the replacement text.