I’m afraid that I don’t have anything useful to contribute, but many, many years ago (1980s), I was using a programmable text editor (anybody remember TPU / LSEdit for VMS?), and implemented exactly this feature. I used it all the time; and I’ve regretted ever since that I’ve never seen it in another editor.
Cheers, Neil Faiman > On Feb 28, 2024, at 12:38 PM, Jim Straus <[email protected]> wrote: > > Hello all regex experts - > I'm looking to change a word in my code to another one, but it is sometimes > "Word", "word" or "WORD". I can do this with three search and replaces. I > also know about the \u\U modifications to the group (so \u\1 to uppercase the > first letter), but that doesn't really work, since I'm changing the word (not > using the group). What I think I want is something that would take just the > case of the matched group and apply that to replacement text. Or is there > another way to accomplish this in one pattern? > Thanks! > -Jim Straus > > -- > 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] > <mailto:[email protected]>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/bbedit/CABL0jSJ%2B9Ka5_jjM-hozQrekmgLPjyhh1svx1B4ZJ%2B439JxUsg%40mail.gmail.com > > <https://groups.google.com/d/msgid/bbedit/CABL0jSJ%2B9Ka5_jjM-hozQrekmgLPjyhh1svx1B4ZJ%2B439JxUsg%40mail.gmail.com?utm_medium=email&utm_source=footer>. -- 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/7BF77BB5-3BBC-49EE-A1F8-E7D4D4AA8BBC%40faiman.org.
