If by "previously substituted text" you mean a string of all $iif(\1 !isin \p,\1)'s up to that step (ie a string of all newly encountered \1's), I agree, it could be useful.
Meanwhile, your specific problem can be solved with something like this:
//echo -ag $regsubex(extreme,/(.)/g,$iif(!$pos($left(\A,\n),\1,2),\1))
If you just want to keep unique letters, and not each first unique letter, you can also do this:
//echo -ag $regsubex(extreme,/(.)(?=.*\1)/g,)
Another imo useful marker would be an incremental equivalent of \A, ie a marker being the string of captured substrings up to the \n-th iteration
Last edited by qwerty; 15/07/07 12:00 AM.