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

Re: [NH] How do I search and replace (delete) all these?

Expand Messages
  • Don - HtmlFixIt.com
    are they all on one line? this is all on one line when you hit search and replace look at bottom center of the dialog there is a little box that says
    Message 1 of 8 , Jan 12, 2010
    • 0 Attachment
      are they all on one line?

      <li>this is all on one line</li>

      when you hit search and replace look at bottom center of the dialog
      there is a little box that says Regular Exp.
      check that or the code given has no hope of working

      try mine first without the ^ and $ in it ...

      If it is not all on one line than you need a different statement

      ayla_z wrote:
      > I feel foolish, but I do not know what you mean by
      > "with Regular Expression checked"
      >
      > I am using version 4.5
      > when I use ^\<li\>.*help \<\/li\>$
      > it says not found.
      >
      > here is a sample of what I am trying to get rid of
      > (there are hundreds of them):
      >
      > <li><
      > href="http://www.domain.com/example-help.p
      > hp">EXAMPLE help </li>
      >
      >
      >
      >
      >
      > --- In ntb-html@yahoogroups.com, "Rudolf Horbas" <rhorbas@...> wrote:
      >>
      >> Am Di, 12.01.2010, 17:13 schrieb ayla_z:
      >>> I have a file with hundred of line items to delete
      >>> where the ? are in the line below they each have
      >>> completely different information..
      >>>
      >>> <li>???????????????????help </li>
      >>>
      >>> Is there a way to tell NoteTabPro 4.5 to delete everything
      >>> that starts with "<li>" and ends with "help </li>"
      >> That's very simple:
      >> Edit -> Replace:
      >> Search:
      >> ^\<li\>.*help \<\/li\>$
      >>
      >> Replace:
      >> (Nothing)
      >>
      >> with Regular Expression checked.
      >>
      >> The expression above produces a blank line.
      >> If you also want the whole line deleted, try:
      >> ^\<li\>.*help \<\/li\>\r\n
      >>
      >> or
      >>
      >> ^\<li\>.*help \<\/li\>\n
      >>
      >> depending on the line endings in your file.
      >>
      >> I can't test the expression myself right now, but it should work OK.
      >>
      >> HTH,
      >> Rudi
      >>
      >
      >
      >
      >
      > ------------------------------------
      >
      > Fookes Software: http://www.fookes.com/
      > NoteTab website: http://www.notetab.com/
      > NoteTab Discussion Lists: http://www.notetab.com/groups.php
      >
      > ***
      > Yahoo! Groups Links
      >
      >
      >
      >
    • Don - HtmlFixIt.com
      if is on more than one line, this will work: (?s) .*?help at least it does in later versions of notetab. One of the most significant advances in
      Message 2 of 8 , Jan 12, 2010
      • 0 Attachment
        if is on more than one line, this will work:
        (?s)\<li\>.*?help \</li\>
        at least it does in later versions of notetab.

        One of the most significant advances in notetab has been in this exact
        area which is why I suggest you update.

        ayla_z wrote:
        > I feel foolish, but I do not know what you mean by
        > "with Regular Expression checked"
        >
        > I am using version 4.5
        > when I use ^\<li\>.*help \<\/li\>$
        > it says not found.
        >
        > here is a sample of what I am trying to get rid of
        > (there are hundreds of them):
        >
        > <li><
        > href="http://www.domain.com/example-help.p
        > hp">EXAMPLE help </li>
        >
      • Rudolf Horbas
        ... You d have to activate the option Regular Expression in the search dialog. ... No wonder if the option mentioned above is not checked. I also dind t see
        Message 3 of 8 , Jan 12, 2010
        • 0 Attachment
          Am Di, 12.01.2010, 17:44 schrieb ayla_z:
          >
          > I feel foolish, but I do not know what you mean by
          > "with Regular Expression checked"

          You'd have to activate the option "Regular Expression" in the search dialog.

          > I am using version 4.5
          > when I use ^\<li\>.*help \<\/li\>$
          > it says not found.

          No wonder if the option mentioned above is not checked.

          I also dind't see that you're in an older version. I'm not 100 % sure, but
          in 4.5 the expression might have been:

          ^<li>.*help <\/li>$

          > here is a sample of what I am trying to get rid of
          > (there are hundreds of them):
          >
          > <li><
          > href="http://www.domain.com/example-help.p
          > hp">EXAMPLE help </li>

          * is each <li></li> in one line, or are there line breaks in between?
          In the latter case, the Regex is a bit harder.

          * are there really whitespaces before the <li>?
          In that case, the expression could be like:

          ^ *<li>.*help <\/li>$

          To the others in the list:
          For 4.5, were the line start and line end really ^ and $, or am I
          remembering this wrong?

          Maybe you really should update to version 5 ...

          Rudi
        Your message has been successfully submitted and would be delivered to recipients shortly.