As I understand, you need to move "(...)" references to the end of each line. 

You can achieve this by continually applying global regexp replace

^(.*?)((\(\d+\))+)(.*?)$
$1$4$2

until there is no occurrence of
\(\d+\)[^(]
in your source text.

Only flaw is that if any "(...)" reference was at the end of line initially,
other references from within line will be added after it, so they will not be
perfectly sorted.

-- 
<http://forum.pspad.com/read.php?2,56667,56669>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem