22501Re: Can I replace text, depending on other text in the same line?
- May 6, 2012--- In firstname.lastname@example.org, "mycroftj" <mycroftj@...> wrote:
> First, Thanks to Flo for the great answers and examples.
> I learn more by studying them than anything else...
> Question: Shouldn't (?=.+KLM) be (?=.*KLM) so KLM directlyI didn't take into account that we could meet with a string 'ABCKLM'. Unfortunately, we were never informed of the list the member is trying to process. So we have to adjust the clip to specific needs, of course.
> after ABC is found?
> Next, I tried the clip even though it looked simple and I thought INo bug. 'DEFKLM' or 'KLMDEF' is matched only if, in this specific case, the 'T' option is set:
> understood it but something strange happened and it seems like a bug
> to me. Please check.
^!Replace "ABC" >> "DEF" HAST
Cf. the Help on Clip Programming: "If the options T or C are not used, NoteTab will search for whole words if the search criteria does not contain spaces or other word delimiting characters. If the search criteria contains such delimiters, then NoteTab will accept matches that are not whole words."
With RegEx, as in my proposal meant for the menu command, it's different because, normally, RegEx don't distinguish between substring and whole word unless you use word delimiters.
- << Previous post in topic Next post in topic >>