At 21:22 +0100 22/11/2010, you wrote:

On 22.11.2010 11:24, Rene wrote:
 Works like a charm. Thanks, Roland!


But seems to me a bit cumbersome.

Yes indeed.

Here a Perl script, which is printing
out the wished result to your shell in one run:...


while (<IN>) {

        if (/(.+?)(\d+)\.tif\n/i) {
                my $tif_name = $2;
                $tif_name=~tr/1234567890/ABCDEFGHIJ/;
                print "$1$tif_name.tif\n";
                next;
        }
        print;
}


Another way to do it (TMTOWTDI) is to create a UNIX/Perl script and run it on the open document. That way you can undo the result if you screw up:


#!/usr/bin/perl
while (<>) {
  m~\d{4}.tif~ and s~(\d)~chr(64+$1)~eg;
  print;
}


JD

--
You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
<http://groups.google.com/group/bbedit?hl=en>
If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group.
Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>

Reply via email to