3 Replies Latest reply on Aug 31, 2006 12:47 AM by

    Regular expression

      Hi there,

      I am trying replace a word in a string an keep the preceding (mandatory) space or dot.
      For now i am using the following code:

      message = "This is some text i wish to replace. Also this should be replaced: text. But not thistext."
      find = "text"
      ReReplacenocase(message, " " & find & "[ .]" , " word", "ALL");
      result = "This is some wordi wish to replace. Also this should be replaced: word But not thistext."

      The result should be:
      result = "This is some word i wish to replace. Also this should be replaced: word. But not thistext."

      Any help would be greatly appreciated.

      Yours sincerely,
      Nebu