I try to find a way to add number to a pattern inside a XML.
String inside XML looks like :
Blabla blabla ${bâtiment} : blabla
And I want at the end
Blabla blabla ${bâtiment1} : blabla
I found something like this :
preg_replace('/\$\{(\w)\w+\}/', '\${\\1#' . $i . '}', $cloneXML);
But it doesn't work, the result contain only the first letter :
Blabla blabla ${b1} : blabla
I don't find something to get all the word :/
Thank for your help