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

RE: [NH] Re: clip to html code text list?

Expand Messages
  • Alan C.
    Hello, Topic: clip that converts a text list of items into an html unorderd list. (wraps a text list with the desired html tags) ... Worked fine on my machine.
    Message 1 of 11 , Dec 9, 2002
    • 0 Attachment
      Hello,

      Topic: clip that converts a text list of items into an html unorderd list. (wraps a text list with the desired html tags)

      >if your lists start without
      >such a charachter (space/*) this might be sufficient...
      >
      >^!Replace "^{.*}" >> "<li>\1</li>" CAIHRS

      Worked fine on my machine.

      Here's a NTB clip can accommodate either if the list item(s) has or does not have leading space or *

      ^!Replace "^[\*\s|\s]*" >> "" CAIHRS
      ^!Replace "^{.*}" >> "<li>\1</li>" CAIHRS
      <ul>
      ^$GetSelection$
      </ul>

      Note the character class above (square brackets) since Notetab wouldn't alternate with the * quantifier (until I put/added the square brackets in, made it a character class)

      (I discovered a difference between NoteTab and Perl: Perl will alternate with the * quantifier as below; Notetab must use a character class in order to do the same.
      For any user of my perl script-- the two lines:

      s/^\*//; # remove leading *
      s/^ *//; # remove leading space(s)

      I updated it, made/replaced both of those lines with just one line:

      s/^\* *|^ *//; # trim leading * and space

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