Am 01.04.2006 um 09:35 schrieb BBEdit-Talk List:
foo = anItem '1;
bar = anItem '2;
rat = anItem '2;
cat = anItem '3;
gog = anItem '4;
Is there some way to resequence my numbers, always in order?
here's a perl snippets which you can use a unix filter:
#! /usr/bin/perl
my $index = 1;
while (<>) {
if ($_ =~ /^(.+?)'\d+;(\n?)$/i) {
print "$1'$index;$2";
$index++;
}
else {print "$_";}
}
the lines to process are all lines ending with: '<number>;
---------------------------
|||
a¿ex
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>