On 20/5/13 at 11:53, [email protected] (Dom O'Brien) wrote:

1,4

I want to add a "_" to the first number ("1_") and repeat to the value of the next number. so 1,4 would end up being

1_1
1_2
1_3
1_4

Here's a Perl text filter that will do it:

#!/usr/bin/perl
while (<>){
  if (/(\d+),(\d+)/) {
    for $i (1..$2) {
      print "${1}_$i\n";
    }
  }
}


#JD

--
This is the BBEdit Talk public discussion group. 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>

--- 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 post to this group, send email to [email protected].


Reply via email to