Re: Easiest way to replace all matches

2021-10-25 Thread John Delacour
On 21 Oct 2021, at 12:47, TJ Luoma mailto:luo...@gmail.com>> wrote: > I'd like to be able to select a word, press a key, and have all instances of > that word be surrounded by {brackets} I wondered if there was a more > native way to accomplish this #!/usr/bin/perl while (<>) {

Re: Easiest way to replace all matches

2021-10-22 Thread TJ Luoma
> That's not overly difficult using a bit of AppleScript. Well, not for you, maybe! Thanks! That's probably something simple enough that I can build on it, too! TJ On Thu, Oct 21, 2021 at 11:40 AM Christopher Stone wrote: > On Oct 21, 2021, at 06:47, TJ Luoma wrote: > > > Assume a

Re: Easiest way to replace all matches

2021-10-21 Thread Christopher Stone
> On Oct 21, 2021, at 06:47, TJ Luoma wrote: > > Assume a 'regular' text file. > > I'd like to be able to select a word, press a key, and have all instances of > that word be surrounded by {brackets}. Hey Tj, That's not overly difficult using a bit of AppleScript. -- Take Care, Chris

Easiest way to replace all matches

2021-10-21 Thread TJ Luoma
Assume a 'regular' text file. I'd like to be able to select a word, press a key, and have all instances of that word be surrounded by {brackets}. For this example, the words would all be names so you would not need worry about "What if the word is {and} but the word "br{and}s" also exists? I