use sed do batch wildcard string replace

Hi,
Here is what I want to do
I want to search local directory and its sub directory, all the files which contain any string like _12345, then remove this string.
String is a combination of _ plus a random integer number.
For example, here is one line in a file before
<properties xmi:id="Property_1246046473688" name="com.ibm.websphere.wxdcgProductVersion" value="6.1.0.4"/>
after change, it should become
<properties xmi:id="Property" name="com.ibm.websphere.wxdcgProductVersion" value="6.1.0.4"/>

Please help.

function replace
{
	dir=$1
	for i in `ls $dir`;do
		file=$dir/$i
		if [ -f $file ];then
			sed 's/\(Property_\)[0-9][0-9]*/\1/g' $file > $file.bak
		else
			replace ${dir}/${i}
		fi
	done
}
path=`pwd`
for i in *;do
if [ -f $i ];then
	egrep 'Property_[0-9]+' $i
	if [ $? -eq 0 ];then 
		sed 's/\(Property_\)[0-9][0-9]*/\1/g' $i > $i.bak
	fi
else
	replace ${path}/${i}
fi
done