Dear ALL,

I have long strings of digits and symbols like this:

S := '1110-00(12)1000011000000020(01)02(12)0000020300100204020-0000002021122222010023013322101002000';

Each single digit or symbol counts as a single position. The digits enclosed between '(' and ')' should also count as a

*single* position, therefore the above string should measure 85 positions (instead of 94, which is the length of the whole string).

I tried to play with the ExtractDelmited function from the StrUtils unit, but strangely the statement below:

C := ExtractDelimited(8, S, ['(', ')']);

returns nothing where I would expect it to return '(12)'.

Could someone give me a hand?

Thanks in advance!