in reply to Re^3: RegExp: pos management in global substitution
in thread RegExp: pos management in global substitution
Your variant still depends of new line. I mean it doesn't work properly with
But thanks anyway. When I parsed your regexp I found new for me \K and totally understood how \G works. See below my solution based on your. Seems it works properly.{name_b param_v="wh"}{name_a param_x="abc" param_a="fsd" param_y="def" +} {name_z param_sd="zka" param_s="df"}{name_a param_y="wtf" param_z="kro +" param_ch="www"}
s/ (?:\{name_a | \G) [^{}]+? \K \w++(?<!param_[xy]) ="[^"]+" //xg;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^5: RegExp: pos management in global substitution
by AnomalousMonk (Archbishop) on Sep 04, 2011 at 13:21 UTC | |
Re^5: RegExp: pos management in global substitution
by AnomalousMonk (Archbishop) on Sep 04, 2011 at 18:41 UTC |
In Section
Seekers of Perl Wisdom