HTML Tags and muliline regular expresions.
Jim Ault
JimAultWins at yahoo.com
Thu Aug 10 12:20:55 EDT 2006
On 8/10/06 4:06 AM, "David Bovill" <david at openpartnership.net> wrote:
> Super cool reply!
>
> It's often that way isn't it - blinded by science. That is just because you
> do not really understand something (regular expressions in this case) - you
> are over impressed by them.
>
> I will give this a try. NB - any problems (given it's limitations) with this
> method you've come across would be good to know. I have run into problems
> with filter before when using it to fliter tables - which got very slow when
> using a few "*" - for instance?
One enhancement for this, depending on your source code,
> <my original>
>replace cr with empty in htmlBlock
>replace "</" with (cr&"</") in htmlBlock --optional depending on result
>replace "<" with (cr&"<") in htmlBlock
>replace ">" with (">"&cr) in htmlBlock
repeat for each line LNN in htmlBlock
put word 1 to -1 of LNN & cr after newHtmlBlock
end repeat
filter newHtmlBlock
put newHtmlBlock into htmlBlock
>filter htmlBlock without "</*"
>replace (">"&cr) with ">" in htmlBlock
--some pages have crazy indents using space runs and this will kill the
lines that look empty as a result
Jim Ault
Las Vegas
More information about the use-livecode
mailing list