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

Foo Lim foo at joshuatree.cs.ucdavis.edu
Wed Nov 24 10:36:16 PST 2004


On Wed, 24 Nov 2004, Mitch Patenaude wrote:

> 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. 
> ;-)

Good catch(es).  I stand corrected.  :-)

FL



More information about the vox-tech mailing list