Remove HTML function

LiangTyan Fui mlist at afteroffice.com
Sat May 18 00:16:01 EDT 2002


On 5/18/02 11:58 AM, Sivakatirswami wrote:

> Does anyone have a script to removing HTML from a string/chunk/whole file?


function html2text htmlRaw
  # trim all html tag
  put offset("<body",htmlRaw) into bodyStart
  if bodyStart > 0 then
    delete char 1 to (bodyStart -1) of htmlRaw
  end if
  replace "<br>" with cr in htmlRaw
  replace "<p>" with cr in htmlRaw
  repeat
    put offset("<",htmlRaw) into sTag
    if sTag = 0 then exit repeat
    put offset(">",htmlRaw) into eTag
    delete char sTag to eTag of htmlRaw
  end repeat
  return htmlRaw
end html2text



> Hinduism Today
> 
> Sivakatirswami
> Editor's Assistant/Production Manager
> katir at hindu.org 
> www.HinduismToday.com, www.HimalayanAcademy.com,
> www.Gurudeva.org, www.hindu.org
> 
> Read The Master Course Lesson of the Day at
> http://www.gurudeva.org/lesson.shtml
> 
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard




More information about the metacard mailing list