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

Re: [NTS] Complicated search and replace expression

Expand Messages
  • afzalnj
    ... search and replace expression ... You, my friend, are simply the best!!!!!! I works perfectly!!!! thanks a lot bro! i was using (/1) instead of $1 (habit
    Message 1 of 7 , Jan 15, 2009
    • 0 Attachment
      --- In ntb-scripts@yahoogroups.com, Ben B <benb_i26up@...> wrote:
      >
      > 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
      >


      You, my friend, are simply the best!!!!!! I works perfectly!!!!
      thanks a lot bro! i was using (/1) instead of $1 (habit from MS word)

      can't thank you enough right now !! :D:D!
    Your message has been successfully submitted and would be delivered to recipients shortly.