Thanks so much for the suggestions. I shall look into it.
The reason for this is I'm creating HTML 5 banners. And need to inject the 
click tags and related codes in 3 different places.

On Saturday, 6 November 2021 at 12:59:53 pm UTC+10 [email protected] 
wrote:

> On Nov 05, 2021, at 06:00, Pu Koh <[email protected]> wrote:
>
>
> Is there a function to run multiple find and replace patterns instead of 
> doing it one at a time? 
>
> ------------------------------
>
> Hey There,
>
> Personally I would most often use a Text Filter and a little Perl, 
> although it depends upon the context.  (See appended script.  See “Text 
> Filter” in the manual if you don't know how to use them.)
>
> NOTE: JJ's example text's tab separators got turned into spaces by the 
> web. (At least in Apple Mail.)
>
> Canon files can be a bit confusing, until you've used them a few times – 
> but they can be very useful.
>
> As Bruce suggested – a Text Factory 
is also a perfectly viable option.
>
>
> --
> Best Regards,
> Chris
>
> ------------------------------
>
> #!/usr/bin/env perl -sw
>
> while (<>) {
>     s/\bnuts\b/NUTS!/g;
>     s/\bgoofy\b/GOOFY!/g;
>     print;
> }
>
> ------------------------------
>
> Sample Text:
>
> ------------------------------
>
> nuts are pretty nutty nuts
> nutso
>
> goof
> goofy is as goofy does.
>
> ------------------------------
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://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 view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/c3d2838f-b5a0-4211-bdb6-9bd7faf5d27cn%40googlegroups.com.

Reply via email to