Hi,
I don't know what happens and where in the code, but... Anyway, it's
strange... I have this code and input.tpl:
--- 8< ---
rule sp {
<[ ]>
}
rule id {
<[a..z]><[a..z0..9]>+
}
sub do($match) {
say $match[0];
return "+";
}
my $template=slurp('input.tpl');
$template ~~
s:g!
[ \< server \: () [+ $?id:=() *=*"(<-["]>*)"]*
* \> (.*?) \<\/ server \: $0 \> ]
|
[ \< server \: () [+()*=*"(<-["]>*)"]* * \/\> ]
!{ do($/) }!;
say $template;
--- 8< ---
text
text
inside inside
text
--- 8< ---
Running it several times, one time works: matches and replaces
things to +-es, one time it not works... Randomly. Where should I send
these kind of bugs?
Bye,
Andras