Loading ...
Sorry, an error occurred while loading the content.

20699Re: [Clip] regex to remove ties

Expand Messages
  • Axel Berger
    May 24, 2010
    • 0 Attachment
      Don wrote:
      > The difference is that I replaced numbers for the T characters.

      This seems to work as requested:

      :loop
      ^!Find "[-;] ([0-9T]+)\. " RAST1
      ^!IfError END
      ^!Set %found%=^$GetSelection$
      ;^!Continue ^%found%
      ^!IfTrue ^$IsNumber(^%found%)$ donext
      ^!If "^%found%" = "T" SKIP
      ^!Set %place%=^$StrDeleteRight("^%found%";1)$
      ^!InsertText ^%place%
      ^!Goto loop
      :donext
      ^!Jump SELECT_END
      ^!Goto loop

      It is surely not the shortest and not the most elegant solution, but it
      is simple minded enough for even me to understand fully.

      Axel
    • Show all 13 messages in this topic