$firstline=~s/(\s)BM/$1XXXXX_BM/g [download]
In reply to Re: regular expression ?! by Utilitarian in thread regular expression ?! by Anonymous Monk