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

Re: Find and IfTrue

Expand Messages
  • Sheri
    ... ^!Find whatever RS ^!IfError FindErrorLabel ;if you get here whatever must be highlighted - your IfTrue condition ^!Replace whateverhighlighted
    Message 1 of 2 , Dec 5, 2006
      --- In ntb-clips@yahoogroups.com, "Mr. Phillip Sand Hansel II"
      <mr.phillip@...> wrote:

      > I can find it with this...
      >
      > ^!Find RPCS\.OHMM.*2-MHZ R
      >
      > if that is found, I would like to do this...
      > ^!Replace RPCS.OHMM RPCSHM.OHMM SIH
      >
      >
      > I thought I could do this....
      > ^!fTrue ^!Find RPCS\.OHMM.*2-MHZ R ^!Replace RPCS.OHMM RPCSHM.OHMM SIH
      >

      You will need to take things one step at a time:

      :Start
      ^!Find "whatever" RS
      ^!IfError FindErrorLabel
      ;if you get here whatever must be highlighted - your IfTrue condition
      ^!Replace "whateverhighlighted" >> "proper replacement" SIH
      ^!IfError ReplaceErrorLabel
      ;what next? Advance to next line?
      ^!Jump +1
      ;next find the next match?
      ^!Goto Start
      ;end of processing
      :FindErrorLabel
      ^!Prompt There are no more "whatevers"
      ^!Goto End
      :ReplaceErrorLabel
      ^!Prompt I guess this should never happen.
      ^!Goto End
      ;end of clip

      Hope that helps.

      Regards,
      Sheri
    Your message has been successfully submitted and would be delivered to recipients shortly.