On 9/8/06 7:52 AM, "paolo mazza" <[EMAIL PROTECTED]> wrote:
> just a simple task for Revolution! > How can I remove html tags from text? > > i.e. > from: try <b> solve<b> this <<httpk.hhkjhlkjlljkl= hkjh> quiz </a> > to: try solve this quiz > > I should use a wildcard but .... > > filter TEXT with "<*>" does not work. It is only for a list. Here's what I use... there's two versions - one for "Rev HTML" (i.e. the version that is generated/managed in Rev): function stsStripHTML what put replaceText(what,"<.*?>","") into noHTML return noHTML end stsStripHTML and the other is for web pages (because they can contain tags like <script> <style>, etc. tags that Rev HTML doesn't maintain): function stsStripHTML what put replaceText(what,"(?si)<script.*?/script>","") into what put replaceText(what,"(?si)<style.*?/style>","") into what put replaceText(what,"<.*?>","") into what put replaceText(what,tab,"") into what put replaceText(what,CR & "{3,}","") into what return what end stsStripHTML HTH, Ken Ray Sons of Thunder Software Web site: http://www.sonsothunder.com/ Email: [EMAIL PROTECTED] _______________________________________________ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution