ReplaceIt

Is a tiny perl script to do regular search and replaces

Nothing new under the sun? Well I don't know, I just needed it and it were simple enough to write.

Usage [-change] regEx filename
   eg. replaceit.perl "/href=\"(\d*.html)\"/foobar data = \$1/g" index.html


If -change is not used it will only show the changes that the command would cause.
The output of the usage could be:
***** index.html has NOT been changed *****
FROM 18: <A href="1.html"><IMG src=".thumb_1.jpg" width=100 height=75 alt="1" title="1" border=0></A></TD>
TO 18: <A foobar data = 1.html><IMG src=".thumb_1.jpg" width=100 height=75 alt="1" title="1" border=0></A></TD>
FROM 20: <A href="2.html"><IMG src=".thumb_2.jpg" width=100 height=75 alt="2" title="2" border=0></A></TD>
TO 20: <A foobar data = 2.html><IMG src=".thumb_2.jpg" width=100 height=75 alt="2" title="2" border=0></A></TD>
FROM 22: <A href="3.html"><IMG src=".thumb_3.jpg" width=100 height=75 alt="3" title="3" border=0></A></TD>
TO 22: <A foobar data = 3.html><IMG src=".thumb_3.jpg" width=100 height=75 alt="3" title="3" border=0></A></TD>

Get your copy here.