title: Regular Expression not working in PHP
body: <p>How to check below line in regular expression?</p>
  
  <p>[albums album_id='41']</p>
  
  <p>All are static except my <code>album_id</code>. This may be <code>41</code> or else.</p>
  
  <p>Below my code I have tried but that one not working:</p>
  
  <pre><code>$str = "[albums album_id='41']";
  $regex = '/^[albums album_id=\'[0-9]\']$/';
  if (preg_match($regex, $str)) {
      echo $str . " is a valid album ID.";
  } else {
      echo $str . " is an invalid ablum ID. Please try again.";
  }
  </code></pre>
  
  <p>Thank you</p>