str_replace php a string : <p>I have a string</p>

<blockquote>
  <p>X_HD003_0</p>
</blockquote>

<p>I have a function PHP</p>

<pre><code>str_replace()
</code></pre>

<p>Ugh......</p>

<p>My result that i want:</p>

<blockquote>
  <p>HD003</p>
</blockquote>

<p>^^, some funny from PPAP song, but some string is: X_HD01_1, X_HD0003_2, X_HD12/12/2016/1_01, this string create by: </p>

<blockquote>
  <p>"X_" + String + "_Number"</p>
</blockquote>

<p>I want to replace X_ and _Number with str_replace(). Hope everyone can help me! Thank you so much! </p>
