Date: Tue, 19 Dec 2000 14:58:33 -0000
Subject: cant work how to get regex to do something like (pattern)\1{14}
Message-Id: <a4tn19.sar.ln@mail.scotlegal.com>

I  have a pipe dellimeted fle where i need to replace the 17th (last) feild
which
does not end with a pipe.
I want to be able to say "look for fist 16 occurances of xxx|     and then
then look for the
next field (last one - the one to be replaced) and then replace with the
first 16th occurances
matched and then the modified data but just cannot get it to work. I was
trying


I have tried
s/([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
([^\|]*\|)
(.*$)/\1\2\3\4\5\6\7\8\9\10\11\12\13\14\15\16 new-string /xg;



but this does not work because it does not like the \10 \11 etc and I cannot
find how to
use a back reference greater than \9. Also I am sure there must be a way to
say smthg
like

 s/([^\|]*\|){16}(.*$)/\1{16} new-string/g;


any pointers would be helpful
thanks.


