Re: [NTB] Help with regex... removing some html tags
- The following two clips below, beginning with H=..., can be called from
another clip by the following example calls:
This one does what you want: ^!Clip "StripDoubleTag" script
These two are related clips that strip tags but not the stuff between the
opening and closing clips:
^!Clip "StripTag" FONT
^!Clip "StripTag" /FONT
Looking at the StripDoubleTag clip you see that a single RegExp won't do the
whole job because the present RegExp engine is "greedy."
^!Find "<^%Tag%" TIS
^!Find "</^%Tag%>" TI
^!Replace "<^&[^>]*>" >> "" RATIS
> every possible character and line feed combination
> Using the following statement:
> It finds the first occurrence of <script and the very last occurrence
> of </script>. It never finds </script> tags that fall in-between.
>Of course, it also selects other tags that I need to keep when it only
> grabs the last </script>.
- Please excuse my replying to this topic on this list. Any subsequent
discussion involving my post should be don on the Clips list. Sorry!