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

RegExp, Double Quotes and ^E (was: Why does <set-var %body> not work?)


Axel Beckert wrote:
> [...]
[results in]
> DESTINATION="/fnord/"

There is another little problem: Those double quotes shouldn't be
there in the last line. But matching regexps against that strings with
doublequotes seems not to work (single-backslash quoted double quotes
according to the WML documentation at engelschall.com):

	<subst-in-var val "^\"(.*)\"$" "\\1" />

The debugging output says always ^E instead of double quotes:

	trace: -1- <subst-in-var val ^^E(.*)^E$ \1>

I didn't find anything in the docs on that ^E thing which is appearing
in the debug output. May those ^Es be the reason why I can't get rid
of those double quotes, because subst-in-var matches ^Es against my

BTW: The easiest way to get rid of them is, not to write them into the
CONFIGURATION body, but that's not the elegant way. ;-)

Oh and another BTW: The solution from my last does not work, if values
go over several lines (in pass 2, so you may use pass 1 to concatenate
several lines using backslashes)...

> Just those empty pairs are still annoying... 

Not anymore: With

	<subst-in-var array "^[\n\s]+" "" />
	<subst-in-var array "[\n\s]+$" "" />
	<subst-in-var array "\n\s+\n" "" />

directly after setting the variable array, even blank lines inside the
CONFIGURATION tag should work.

P.S.: Hope you don't mind, that you get noticed about the advances in
my actual debugging process step by step. :-)

		Regards, Axel
Axel Beckert - abe@cs.uni-sb.de - http://abe.home.pages.de/
Student of Computer Science, University of Saarland (Germany)
Artificial Intelligence Laboratory (AI Lab), Prof. Dr. W. Wahlster;
WWW-Administrator IBFI Schloss Dagstuhl; Students Representative
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com