G
giri alamuri
What I want to do is:
s/begin(^(abc)).*end//xyz/gs
What I meant above is, find string begin which is not followed by abc and
then followed by any string till it find "end" and replace the whole string
with "xyz" globally.
That is, I want to replace begin.*end with xyz only if begin is not followed
by "abc".
I want to do it globally. So, following will not work:
unless (/beginabc/) {
s/begin(^(abc)).*end//xyz/gs
}
s/begin(^(abc)).*end//xyz/gs
What I meant above is, find string begin which is not followed by abc and
then followed by any string till it find "end" and replace the whole string
with "xyz" globally.
That is, I want to replace begin.*end with xyz only if begin is not followed
by "abc".
I want to do it globally. So, following will not work:
unless (/beginabc/) {
s/begin(^(abc)).*end//xyz/gs
}