[vox-tech] Using awk or perl to find and replace

Peter Jay Salzman p at dirac.org
Wed Nov 24 10:23:26 PST 2004


On Wed 24 Nov 04, 10:20 AM, Mitch Patenaude <mrp at sonic.net> said:
> On Nov 24, 2004, at 10:15 AM, Mitch Patenaude wrote:
> >perl -pi.orig -e 's/h.(.*?).([Jj][Pp][Gg])/$1.h.$2/g;' *.html
> 
> oops.. that should be
>   perl -pi.orig -e 's/h\.(.*?)\.([Jj][Pp][Gg])/$1.h.$2/g;' *.html
> 
> (forgot to escape the literal periods.  This is why my mom detests 
> regex... it ends up looking an awful lot like old serial line noise. 
> ;-)
> 
>   -- Mitch

LOL.  That deserves to be in someone's .sig...   ;-)

Pete


More information about the vox-tech mailing list