title: Using PHP replace regex with regex
body: <p>I want to replace hash tags in a string with the same hash tag, but after adding a link to it</p>
  
  <p>Example:</p>
  
  <pre><code>$text = "any word here related to #English must #be replaced."
  </code></pre>
  
  <p>I want to replace each hashtag with</p>
  
  <pre><code>#English ---&gt; &lt;a href="bla bla"&gt;#English&lt;/a&gt;
  #be ---&gt; &lt;a href="bla bla"&gt;#be&lt;/a&gt;
  </code></pre>
  
  <p>So the output should be like that:</p>
  
  <pre><code>$text = "any word here related to &lt;a href="bla bla"&gt;#English&lt;/a&gt; must &lt;a href="bla bla"&gt;#be&lt;/a&gt; replaced."
  </code></pre>