Re: expanding Ranges

2005-04-24 Thread N. Ganesh Babu
Thanks John, I did not think this is this much easy. Thanks alot. Regards, Ganesh John W. Krahn wrote: N. Ganesh Babu wrote: Dear All, Hello, input: T 6 TC output T 6 TC How can it be achieved in regular expression?. Or any other means is easy. I am trying to put the coding of for loop inside sub

Re: expanding Ranges

2005-04-24 Thread John W. Krahn
N. Ganesh Babu wrote: Dear All, Hello, input: T 6 TC output T 6 TC How can it be achieved in regular expression?. Or any other means is easy. I am trying to put the coding of for loop inside substitution string with (?{...}) but it is not working. $ perl -le' $_ = q/6/; print; s/(\d+)-(\d+)/join

Re: expanding Ranges

2005-04-24 Thread Randy W. Sims
N. Ganesh Babu wrote: Dear All, input: T 6 TC output T 6 TC How can it be achieved in regular expression?. Or any other means is easy. use Set::IntSpan; my $set = Set::IntSpan->new('1-3,4,5,6-10'); my @elems = $set->elements; print join( ',', @elems ), "\n"; __END__ -- To unsubscribe, e-mail: [EMA

expanding Ranges

2005-04-24 Thread N. Ganesh Babu
Dear All, input: T 6 TC output T 6 TC How can it be achieved in regular expression?. Or any other means is easy. I am trying to put the coding of for loop inside substitution string with (?{...}) but it is not working. Please help. Regards, Ganesh -- To unsubscribe, e-mail: [EMAIL PROTECTED] For