Any characters wildcard or regex?

Klaus major-k klaus at major-k.de
Thu Sep 22 10:12:03 EDT 2016


Hi Mike and Keith,

> Am 22.09.2016 um 16:03 schrieb Mike Bonner <bonnmike at gmail.com>:
> 
> Using replacetext, you're probably looking for "<.*>"
> but you might be able to use a field for this..  set the htmltext of the
> field to your source text, Then if you don't want the formatting preserved
> set the text of the field to the text of the field.  One problem with this
> method is that you may end up with javascript left over because it can
> appear between <script> and </script>

you can even (ab)use "the templatefield" for this:
...
set the htmltext of the templatefield to url("http://your_url/here.html")
put the text of the templatefield into fld 1 # or a variable
reset the templatefield ## !!
...

> On Thu, Sep 22, 2016 at 7:34 AM, Keith Clarke <keith.clarke at me.com> wrote:
> 
>> Hi folks,
>> I’m trying to strip out all HTML tags from text in a variable. Replacement
>> of specific tags works fine... replace “<ul>" with empty in tText …but I’m
>> struggling to find (documentation on) a blanket ‘any number of any
>> characters’ wildcard or regex approach...
>> 
>> So far I’ve tried "<*>”, “<[*]>”,  “<[.*]>”, "<" & "[.*]" & “>” to no avail
>> 
>> Any clues greatly appreciated.
>> Best,
>> Keith..

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list