title: PHP. Named groups in the replacement string
body: <p>How to use named groups in the replacement string?<br>
  This expression creates a named group :  </p>
  
  <pre><code>$re= "/(?P&lt;name&gt;[0-9]+)/";
  </code></pre>
  
  <p>I would like to replace this expression, but it does not work.  </p>
  
  <pre><code>preg_replace($re, "\{name}", $text);
  </code></pre>