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

433Re: [NTS] Complicated search and replace expression

Expand Messages
  • David Smart
    Jan 14, 2009
      Are you over-egging the pudding?

      To me it looks as though you simply want to replace the string

      "-"!:\private\a000bd8c\

      with

      "-"!:\resource\

      Where the only variable bit is the a000bd8c, and you don't want this in the
      replace part anyway.

      Regards, Dave S

      ----- Original Message -----
      From: "afzalnj" <afzalnj@...>
      To: <ntb-scripts@yahoogroups.com>
      Sent: Thursday, January 15, 2009 8:46 AM
      Subject: [NTS] Complicated search and replace expression


      >I need to use the search and replace function. here's what i wanna do
      > Note: I have not used any regular expressions here...
      >
      > i wanna find this:
      > \resource\activeprofile.py"-"!:\private\a000bd8c\
      >
      > and replace it by
      > \resource\activeprofile.py"-"!:\resource\
      >
      > now...the name "activeprofile.py" has to be the variable as its not
      > the same for every entry
      >
      > so its something like this
      > Find this:
      > \resource\*"-"!:\private\a000bd8c\
      >
      > and replace it with:
      > \resource\*"-"!:\resource\
      >
      > where * is whatever the filename is...and it should not get replaced
      >
      > also if its possible can i search for
      > \^\*"-"!:\private\a000bd8c\
      >
      > and replace it with
      > \^\*"-"!:\^\
      >
      > where ^ is what was in the place of ^ when text was found
      > and * is what was in the place of *
      >
      > plz help me and reply quickly...this is a pkg script for a SIS file
      > (for symbian installation)
      >
      > Thank you very much in advance
      >
      > update:
      > 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??
      >
      >
      > ------------------------------------
      >
      > Fookes Software: http://www.fookes.com/
      > NoteTab website: http://www.notetab.com/
      > NoteTab Discussion Lists: http://www.notetab.com/groups.php
      >
      > ***
      > Yahoo! Groups Links
      >
      >
      >
    • Show all 7 messages in this topic