in reply to regular expression question

Try in the command line:
perl -e 's/(CELL_NAME)(.*)(_[A-Z]_)(.*)/$1$2_$4/g' -p -i.bak yourfile

that will produce a backup of your file in "yourfile.bak" and make the substitution "ala sed"

Casiano