in reply to Re: Perl RE; how to capture, and replace based on a block?
in thread Perl RE; how to capture, and replace based on a block?
Thank you educated_foo.
" Keep adding "VAR," between the parens in #2 as long as Perl complains about 'Global symbol "VAR"...'
Someone should probably write an Acme:: module to do this automatically."
I'll be glad to. Just as soon as I figure this all out. :)
My biggest hangup, I think, is that I'm quite comfortable with sed. But sed is "greedy" by default, and while Perl RE can be. It's not, by default, and that's what I need here (not greedy).
will match my pattern in sed. But it will match from the first </div> till the first </body>. Which is too much.s/\<\/div\>/,/\<\/body\>/
Thanks again for the response, educated_foo
--Chris
Yes. What say about me, is true.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Perl RE; how to capture, and replace based on a block?
by Laurent_R (Canon) on Dec 18, 2013 at 07:46 UTC | |
by taint (Chaplain) on Dec 18, 2013 at 08:02 UTC | |
by Laurent_R (Canon) on Dec 18, 2013 at 18:36 UTC | |
by taint (Chaplain) on Dec 18, 2013 at 20:18 UTC | |
Re^3: Perl RE; how to capture, and replace based on a block?
by Anonymous Monk on Dec 18, 2013 at 07:29 UTC |
In Section
Seekers of Perl Wisdom