Le 27 f˝Îrier 23:40, Adam Akhtar a ˝─rit :

> Thanks Fred and Robert for that.
> 
> I dont understand what the \1 does. I know if i remove it it removes all 
> the characters before the 10th and if i include it in keeps them. Why is 
> this?

It's a reference to the first parenthesied group.  To decompose the
expression :

(           => begin group 1
 .{9}       => find exactly 9 characters
     )      => end group 1
      .     => followed by exactly one character

I replace that whole group by the first group (my 9 characters) and a
star.

There are best ways to do it (especially if you're manipulating very big
strings, I think), but I think it's the clearest.

Fred
-- 
Full-size scottish highland pipes are loud enough to fall into the
category of 'weaponry', especially if they're played poorly, but it's an
analogue of heavy metal if they're played well.
                                           (Gary S. Callison in the SDM)