You need a regular expression (perlreref) for the 'PATTERN' in a substitution operator (s/PATTERN/REPLACEMENT/msixpodualngcer). Your single example does not provide enough information for us to offer much help in writing that regex.
Bill
Comment on Re: Edit a New file in place after reading it in