/ Published in: Perl
Haven't tried this with any recent versions of Word. Yet.
Expand |
Embed | Plain Text
#/usr/local/bin/perl -w use strict; ############################################################# # # # # # # # NOAH SUSSMAN # # # # clean up word # # # # Created 5/16/01 at 02:33 PM # # # # Clean up Word documents that have been translated to HTML # # # # # ############################################################# @ARGV[0] = "Macintosh HD:NOAH:2001:05-MAY 2001:3-May 15-21:3-Revisions to Corp Site:large number of Word docs:1.2 Services.html" ; $^I=".bk"; while (<>) { s{<(\w+)>(.*?)<([^$1])>(.*?)<(/$1)>(.*?)<(/$2)>}{<$3>$2<$1>$4<$5>$6<$7>}gi; # Fix mis-nested tags, if any. print $_ ; }
You need to login to post a comment.
