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

[Clip] Modifying the Strip HTML Tags function

Expand Messages
  • eric_richards@upscalemale.com
    The stip HTML tags function doesn t work quite the way I need it to. When used, it will leave the remaining words in the title and body sections. What I m
    Message 1 of 1 , Aug 3, 1999
      The stip HTML tags function doesn't work quite the way I need it to.
      When used, it will leave the remaining words in the title and body
      sections.


      What I'm looking for is a function that will leave the remaining words
      in the title and body BUT also in the meta tags(ie. keyword and
      description). So...

      1. Is there a clip which does the same thing as Strip HTML tags which I
      can modify?

      2. How does one create a clip to get the contents of a meta tag?
      (ex. <META NAME="Description" CONTENT="dogs,cats,animals,birds,tige
      rs">)

      What I need remaining is just the words; dogs,cats,animals,birds,tigers

      I have a clip I modified to get words from a title but it does not work
      for getting content from a specific meta tag.

      Clip below:

      Title Analyzer
      ;Ensure input focus is in the document
      ^!FocusDoc
      ;Search forwards for the regular expression matching the tag
      ^!Find "<TITLE" RISW
      ;End procedure if the searched tag is not found
      ^!IfError End
      ;If the selection includes the end of the opening tag, then jump to the
      label SetStartPosition
      ^!If ^$StrCopyRight("^$GetSelection$";1)$ = ">" SetStartPosition
      ;Find end of opening tag
      ^!Find ">" IS
      ^!IfError End

      :SetStartPosition
      ;Place cursor at end of selection and remove highlight
      ^!Jump Select_End
      ;Store cursor position in a variable
      ^!Set %Start%=^$GetRow$:^$GetCol$
      ;Search for the closing tag
      ^!Find "</TITLE>" IS
      ;End the procedure if it is not found
      ^!IfError End
      ;Place cursor at start of selection and remove highlight
      ^!Jump Select_Start
      ;Store cursor position in a variable
      ^!Set %End%=^$GetRow$:^$GetCol$
      ;Move the cursor back to the first saved position (after the opening
      tag)
      ^!SetCursor ^%Start%
      ;Extend the selection to the second saved position (in front of the
      closing tag)
      ^!SelectTo ^%End%
      ^!IfTrue ^$IsEmpty(^$GetSelection$)$ End
      ;^!Clip "Strip Stop Words"
      ^!Keyboard Shift+Ctrl+T
      ^!Keyboard ALT+T S &400 M
    Your message has been successfully submitted and would be delivered to recipients shortly.