in reply to Search and replace with a wild card

Like the others, I was a bit confused by the exact request. But here is another solution that returns the #s, which I'm wondering is what you want.
my %xref; $xref{'NAME'} = 'NAME'; $xref{'DESC'} = 'DECSRIPTION'; $xref{'DATE'} = 'DATE'; while (<DATA>) { # s/(NAME|DESC|DATE)(\d*)/$xref{$1}/eg; s/(NAME|DESC|DATE)(\d*)/$2/g; print; } __DATA__ NAME010 DESC025 DATE009 NAME011 DESC035 DATE009


-jbWare