[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: Erasing redundant newlines, spaces and tabs

El Wed, Dec 15, 1999 at 12:33:33PM +0100, Denis Barbier contaba:
>> Is there a better, safer or faster way to do this? 

><define-container clean>
>#  inside brackets, put a space, a tab and a newline
><subst-in-string %qbody "[      
>]+" " ">

Good Tip! Thanks! But it still does not satisfy me so much...

Just some hours after I remembered there is a special pass to do this
kind of things...

<define-tag head-clean>
[[s/[\n\r\t ]+/ /g]]\

I don't know if it is faster or better, but 'Perl Regular Expresions'
are much more flexible.

By the way, the tag itself is much more complicated. I use it to
filter the contents of the data fields in the HEAD of the page. 

#use wml::fmt::isolatin
<define-tag head-clean>
[[s/[\n\r\t ]+/ /g]]\

><ose        xmanoel@bigfoot.com   (Vigo/Galicia/Espaņa)

12/16	Beethoven born, 1770
12/16	Don McLean's "American Pie" is released, 1971
12/16	Ludwig von Beethoven christened in Bonn, Germany, 1770
12/16	(12/16/1773) Boston Tea Party (30-60 patriots and 342 chests of tea). 
12/16	(12/16/1770) Ludwig Van Beethoven, composer. 
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com