home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / epmrex.zip / UNHTML.ERX < prev   
Text File  |  1995-11-10  |  931b  |  24 lines

  1. /* UnHTML.ERX - EPM Rexx macro to remove HTML, by Larry Margolis  */
  2. /* Place in PATH, and invoke from EPM command line as:  rx unhtml */
  3.  
  4. 'extract /version/line'
  5. if version.1 > 60000 then  /* Got the (much) better version?      */
  6.    grep = 'x'              /* - use eXtended GREP; much faster!   */
  7. else                       /* Only the 5.51 "Enhanced Editor" ... */
  8.    grep = 'g'              /* - have to use the older Grep option */
  9. 'display -2'               /* Turn off messages. */
  10. '0'                        /* Go to top of file. */
  11. 'c /<[^>]*>// *'grep       /* Delete all tags. */
  12. '0'                        /* Go to top of file. */
  13. 'c /</</ *'             /* Handle some common symbols... */
  14. '0'
  15. 'c />/>/ *'
  16. '0'
  17. 'c /&/&/ *'
  18. '0'
  19. 'c /"/"/ *'
  20. '0'
  21. 'c / / / *'
  22. 'display 2'                /* Turn messages back on. */
  23. line.1                     /* Position back where user was. */
  24.