This can be easily fixed by using named backreferences. \k<named> would refer to a match of the pattern (?<named>...).
In reply to Re^4: Challenge: Transforming markups
by hdb
in thread Challenge: Transforming markups
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |