thx for the help smile

So, if I correctly understood the issue, that would be the way the regexp library treats them.

//echo -a > $regsubex(Ga is Ga is Ga,/(is) (Ga)/g, > \t <)

The first match would set \t to \1
The second match would set \t to \2
And as \1 and \2 are dissociated, the replacements are correct.

First match > \1 == is ; so replace 'is Ga' with 'is'
Second match > \2 == Ga ; so replace 'is Ga' with 'Ga'

For the second case, it's simpler. Only \1 exists each time. So \t will always be equal to 'is Ga' thus replacement is correct.

Am I right ?

Is the functionning of \t normal in the 2 cases ?

Last edited by TropNul; 28/06/07 12:49 PM.