in reply to Re: substitute instead global matching for nested matches
in thread substitute instead global matching for nested matches
This returns the first element in the 2nd match. I need to get the last element. So the result must be
#4 r2 ! #5 r5 !
And your code is restricted to 3 consecutive elements separated by lines. I need to a more generic solution because my lists are changing variably. Sorry did not mention that clearly in my previous post (the global match ((\S+\s+\S+\s+)*) implies that). So a $fc could be
#4 r1 ! #5 r3 ! r7 ! r10 ! #8 r0 ! r1 !
I need to get the last r member. Any help appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: substitute instead global matching for nested matches
by GrandFather (Saint) on Mar 18, 2012 at 23:19 UTC | |
by utku (Acolyte) on Mar 18, 2012 at 23:27 UTC |