Why can’t capturing groups be part of a conditional expression when specifying a string rather than a function as the replacement?
I’m referring to this question. Why can’t capturing groups be part of a conditional expression when specifying a string rather than a function as the replacement?
How to insert certain character[s] only if capturing group isn’t empty?
Given are these strings: