Hey David,
David G Wagner wrote on 2022-01-07 1:10 PM:
> Here is the data that I am working with.
>
> All data below this line
> #start#
Note that the very first "#start#" starts with a lower-case 's', while
the rest start with upper-case 'S';
Fixing that, try this as a BBEdit text filter (between the '###'s:
###
#!/usr/bin/env perl
my $incr = 1;
local $/ = "#Start#\n";
while (<>) {
s/^1/$incr++/es;
print;
}
###
This sets the "end of line" to "#Start#\n", which puts the number 1 as
the first character of the next line. Within the loop over these
"lines", the filter substitutes an incrementing number for that '1'.
HTH
--
- Bruce
_bruce__van_allen__santa_cruz__ca_
--
This is the BBEdit Talk public discussion group. If you have a feature request or need
technical support, please email "[email protected]" rather than posting here.
Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups "BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/c7d5f33c-0008-8429-fb10-03e86780e0d0%40cruzio.com.