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

How do I search and replace (delete) all these?

Expand Messages
  • 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..
    Message 1 of 8 , Jan 12, 2010
    • 0 Attachment
      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>"

      Thank you for your time and attention..
    • Rudolf Horbas
      ... That s very simple: Edit - Replace: Search: ^ .*help $ Replace: (Nothing) with Regular Expression checked. The expression above produces a
      Message 2 of 8 , Jan 12, 2010
      • 0 Attachment
        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
      • Don - HtmlFixIt.com
        I don t know 4.5 and the regex engine in it ... you MUST upgrade to get regex help. Try replacing: .*help with nothing be sure regex (Regular
        Message 3 of 8 , Jan 12, 2010
        • 0 Attachment
          I don't know 4.5 and the regex engine in it ... you MUST upgrade to get
          regex help.

          Try replacing:
          \<li\>.*help \</li\>
          with nothing

          be sure regex (Regular Expressions) is checked. This would work in
          current notetab. Regular expressions have improved remarkably.

          Don

          ayla_z wrote:
          > 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>"
          >
          > Thank you for your time and attention..
          >
          >
        • Don - HtmlFixIt.com
          yes Rudolf did what I planned to do ... if the li is the first and last thing on each line add the ^ at the start and the $ at the end. I hit send before I
          Message 4 of 8 , Jan 12, 2010
          • 0 Attachment
            yes Rudolf did what I planned to do ... if the li is the first and last
            thing on each line add the ^ at the start and the $ at the end.
            I hit send before I meant to :-)

            I think you need \r\n at the end if you want to get rid of extra returns
            or you can use \R in the current rendition of notetab, but not in 4.x I
            don't believe.

            Again you really would do yourself a favor to upgrade the program.

            Rudolf Horbas 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
            >
            >
            >
            >
          • ayla_z
            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 ^ .*help $ it says not
            Message 5 of 8 , Jan 12, 2010
            • 0 Attachment
              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
              >
            • 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 6 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 7 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 8 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.