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

438Re: [NTS] Complicated search and replace expression

Expand Messages
  • afzalnj
    Jan 15, 2009
    • 0 Attachment
      sorry bro, maybe i failed in explaining the problem...but now u know ;)

      --- In ntb-scripts@yahoogroups.com, "David Smart"
      <smartware.consulting@...> wrote:
      >
      > Well that was not what you said. To quote your first message ...
      >
      > > > so its something like this
      > > > Find this:
      > > > \resource\*"-"!:\private\a000bd8c\
      > >> >
      > >> > and replace it with:
      > >> > \resource\*"-"!:\resource\
      >
      > You were looking for the string "resource", not something that was
      variable.
      > And your replace part was explicitly "resource" as well.
      >
      > Perhaps you'd like to re-state your problem more accurately.
      >
      > Regards, Dave S
      >
      > ----- Original Message -----
      > From: "afzalnj" <afzalnj@...>
      > To: <ntb-scripts@yahoogroups.com>
      > Sent: Thursday, January 15, 2009 8:30 PM
      > Subject: Re: [NTS] Complicated search and replace expression
      >
      >
      > > no brother...i also have lines which are like this
      > >
      > > \sys\bin\_aosocketnativenew.pyd"-"!:\private\a000bd8c\
      > >
      > > obviously i cant replace !:\private\a000bd8c\ with c:\resource\ here
      > >
      > > i need this line to be
      > >
      > > \sys\bin\_aosocketnativenew.pyd"-"c:\sys\bin\
      > >
      > > i hope you understand... in this particular example
      > > _aosocketnativenew.pyd is the constant that i dont want to change
      > >
      > >
      > >
      > > --- In ntb-scripts@yahoogroups.com, "David Smart"
      > > <smartware.consulting@> wrote:
      > >>
      > >> 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
      > >> >
      > >> >
      > >> >
      > >>
      > >
      > >
      > >
      > > ------------------------------------
      > >
      > > 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