more useful options | |
PerlMonks |
Match last instance of patternby techie411 (Acolyte) |
on Nov 05, 2008 at 21:41 UTC ( [id://721825]=perlquestion: print w/replies, xml ) | Need Help?? |
techie411 has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to do a Perl one-liner to replace ONLY the last </TABLE> Tag and replace it with something. I tried the following, but it doesn't work:
perl -pi -e 's/.*<\/TABLE>/REPLACE/' test.htm The following doesn't just match the last one but also replaces another </TABLE> tag. Any assistance appreciated. Thanks.
Back to
Seekers of Perl Wisdom
|
|