hi, thanks for thinking!
Q: dynamic usage of regex in a repeat loop
My current status is to use the do command and the construction of the runrev
command at runtime, which might slow down a little bit because it has to be
done anytime.
----------------------------------------------------------------------
content of field "auftrag":
put matchText(field "original","$regex",$variablelist) into decision
content of field "eval":
([A-ZÄÖÜ]{1,3}) ([0-9,]{1,5}) ([0-9,.]+)(.*)
region, zimmerzahl,wohnfläche,preis,bemerkung
script:
-----------------------------------------------------------------------
repeat
..
try
put field "auftrag" into befehl;
replace "$regex" with line 1 of field "eval" in befehl;
replace "$variablelist" with line 2 of field "eval" in befehl;
do befehl
end try
..
end repeat
--------------------------------------------------------------------
Suggestion for improvement in next versions might be the possibility to use an
array variable to get the values of the () variables in array[1] etc.
matchtext(text,regex,array)
matchtext(field "orig",regexline,resultarray)
Regards, Franz
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution