Ray Muforosky <izombe@yahoo.com> wrote:
> I need to do string substitution
> asda tgn=0513, thr=122, options=sched,
> asca tgn=055, thr=562, options=sched,
> where there is "thr=###" I need make it "thr=##" deleting the first
> digit.
> asda tgn=0513, thr=22, options=sched,
> asca tgn=055, thr=62, options=sched,
> I know less 15 lines of perl script will do it, but I'm wondering if
> there is another way.
perl -pe 's/thr=\d(\d\d)/thr=$1/' filename
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas