If there are a lot of replacements it might be easier to do a script. Open 
Script Editor and create a script like this with all your find/replace 
operations. This conducts its operations in the frontmost window.

tell application "BBEdit"
 activate
  replace "~NM1*87*2~N3*" using "↵ BILLING ADDRESS: " searching in text 1 of 
front text document options {starting at top:true}
  replace "~DMG*D8*" using "↵ SUB DOB: " searching in text 1 of front text 
document options {starting at top:true}
  replace "~~NM1*82*1*" using "↵ PROVIDER NAME: " searching in text 1 of front 
text document options {starting at top:true}
end tell

You can use GREP as well by adding a search mode option.

    replace "~NM1\*87\*2~N3" using "↵ BILLING ADDRESS: " searching in text 1 of 
front text document options {search mode:grep, starting at top:true}

[fletcher]



> On Apr 10, 2018, at 11:39 AM, Mike W <[email protected]> wrote:
> 
> Is there a search pattern that would be able to do a Multiple Find and 
> Replace at once?
> 
> I have a large file and dozens of items that need to be replaced.
> 
> Here are some examples: 
> 
> find: "~NM1*87*2~N3*" and replace with "↵ BILLING ADDRESS: "
> 
> find: "~DMG*D8*" and replace with "↵ SUB DOB: "
> 
> find: "~~NM1*82*1*" and replace with "↵ PROVIDER NAME:  "
> 
> the list goes on and on... 
> 
> any ideas- much appreciated - Thanks in advance!
> 
> -- 
> This is the BBEdit Talk public discussion group. If you have a 
> feature request or would like to report a problem, please email
> "[email protected]" rather than posting to the group.
> Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
> --- 
> You received this message because you are subscribed to the Google Groups 
> "BBEdit Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/bbedit.

-- 
This is the BBEdit Talk public discussion group. If you have a 
feature request or would like to report a problem, please email
"[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
--- 
You received this message because you are subscribed to the Google Groups 
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to