I believe in the example they used it would be $remove($1-,_)
as the replace proc you used would mean the filename would still be different.