Re: Search/Replace capabilities of KATE 22.12.3
Richard Owlett <[email protected]> Fri, 7 Feb 2025 05:24:04 -0600
| Newsgroups | gmane.comp.kde.general |
|---|---|
| Message-ID | <[email protected]> |
On 2/7/25 2:51 AM, Rens Oliemans wrote: > Richard Owlett <[email protected]> writes: > >>>> I wish to write macros using ERE's[1] to make my project feasible. >>> >>> This is not possible: >> >> Clarification: >> I'm unsure of explicitly "This" refers to. >> ... >> I was referring to the general concept of an ERE, not an implementation. > > Ah I'm sorry, rereading my email shows that it was a bit unclear on some parts. > I meant that the exact ERE syntax of sed that you linked to is not necessarily > possible. In general, the regex of KATE is quite powerful, so if you want some > form of extended regexps, I think that you're good. > >>> [0] https://docs.kde.org/stable5/en/kate/katepart/regex-patterns.html >>> [1] https://gutenberg.org/ebooks/1727 >> ^ >> +--- *????* my post was: >> https://www.gnu.org/software/sed/manual/html_node/ERE-syntax.html > > My search/replace example was about this book, but I forgot to add that. > >> You've given me a homework assignment. > > KATE's regexp syntax is very similar to others, so I think that if you find a > good body of documentation for regexps, you can probably extend it quite easily > to KATE. > > Alternatively, feel free to give a couple of examples of what you want replaced, > if you want to have some more examples. > I was planning that. I'm restarting my project after a hardware triggered interruption. Your previous post and a re-read of https://unix.stackexchange.com/questions/27901/match-one-part-of-a-regular-expression-in-a-kwrite-find-and-replace-regex suggests a solution to a separate personal project. The above link says in part:> > Try: > > Find: ([a-z])[0-9] > Replace: \1 > > Parenthesis save content matched and can be used with expression \<number> depending of how many parenthesis used in the Find expression and its order from the beginning. > > For example, if you wanted to change order between the letter and the number, would be: > > Find: ([a-z])([0-9]) > Replace: \2\1 > Raises the question: "In a KATE macro, instead of doing a "Replace:" operation could there be an "append to a different file" operation be performed"? Back to the manual ;} *BTW* Do you realize your posts do not appear in the archives at https://mail.kde.org/pipermail/kde/2025-February/thread.html ???? Thanks again for your guidance.