in reply to Re^3: Challenge: Transforming markupsin thread Challenge: Transforming markups
This can be easily fixed by using named backreferences. \k<named> would refer to a match of the pattern (?<named>...).