How can I place characters directly next to a group reference in regex? For example, if I am replacing the expression "0([0-9])" with "\1 aaa" it will show the number with a space and then "aaa" next to it. I want to place "aaa" directly next to the number without a space in between them.
EDIT: Sorry, I forgot the issue in my example. I am trying to place a number directly next to the group reference, which does not work. I am using the Python re module.