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

17150Re: [Clip] Regular expression replace upon a string variable - howto?

Expand Messages
  • Hugo Paulissen
    Nov 27, 2007
    • 0 Attachment
      Hi Alec,

      I think I did it once along these lines (similar approach to Flo's)...

      :FINDREGEX
      ^!Find "bl[uea]" RISW
      ^!IfError End
      ^$StrReplace("bl";"--";^$getSelection$;0;0)$
      ^!Goto FINDREGEX

      Tested with:
      Blind
      Bleu
      Blue
      Blond
      Black

      Results in:
      Blind
      --eu
      --ue
      Blond
      --ack

      Hugo


      ----- Original Message ----
      From: "buralex@..." <buralex@...>
      To: "ntb-clips@yahoogroups.com" <ntb-clips@yahoogroups.com>
      Sent: Tuesday, November 27, 2007 12:22:20 PM
      Subject: [Clip] Regular expression replace upon a string variable - howto?

      Is there any way to do a string replace operation in a clip that will
      act upon a variable?

      ^$StrReplace( "SubStr"; "ReplaceStr" ;"Str";CaseSensi tive;WholeWord) $
      doesn't appear to support it.

      The only way I can think of is to use a separate buffer (file), paste
      the source text, do the replace, select all, put $getselection$ in a
      variable and switch back to the buffer you really want to be in.

      Regards ... Alec -- buralex-gmail
      --





      ____________________________________________________________________________________
      Never miss a thing. Make Yahoo your home page.
      http://www.yahoo.com/r/hs

      [Non-text portions of this message have been removed]
    • Show all 7 messages in this topic