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

437Re: [NTS] Complicated search and replace expression

Expand Messages
  • Ben B
    Jan 14, 2009
    • 0 Attachment
      On 2009-01-14 01:46:47 afzalnj wrote regarding; "[NTS] Complicated search and replace expression"

      > ok, i can now find the text i want to replace using this Regular
      > expression
      >
      > \\resource\\(\w+)\.py"-"\!\:\\private\\a000bd8c\\
      >
      > but how to replace it so it looks something like this
      >
      > \\resource\\(\w+)\.py"-"\!\:\\resource\\
      >
      > where (\w+) remains unchanged??

      You've discovered tagged matches on your own. All you need now is a
      back-reference.

      An expert should be along shortly. Until then, this should do what you
      want:

      Find
      \\(\w+)\\(\w+)\.py"-"!:\\.*

      Replace with
      \\$1\\$2.py"-"!:\\$1\\

      HTH
      Ben
    • Show all 7 messages in this topic