On Mon, 04 Feb 2002 04:49:22 +0100, Bart Lateur wrote:

>Dead easy.

I just thought of another approach: replace the 

        $2-$1==1

in the RHS of the regex substitution, with

        $2-$1<=1

Because $1 is not larger than $2, as the source array is sorted, nothing
else is matched but differences of 0 and 1.


This will produce

        345-345-346

in the string after the replacement. Postprocessing will delete the
"-345".

-- 
        Bart.

Reply via email to