title: php switch statement with wildcard in the string
body: <p>I would like to have a <strong>switch statement</strong> with both literal cases and cases with a <strong>wildcard</strong> in the string:</p>
  <pre><code>switch($category){
      case 'A**': $artist= 'Pink Floyd'; break;
      case 'B**': $artist= 'Lou Reed'; break;
      case 'C01': $artist= 'David Bowie'; break;
      case 'C02': $artist= 'Radiohead'; break;
      case 'C03': $artist= 'Black Angels'; break;
      case 'C04': $artist= 'Glenn Fiddich'; break;
      case 'C05': $artist= 'Nicolas Jaar'; break;
      case 'D**': $artist= 'Flat Earth Society'; break;
  }
  </code></pre>
  <p>Of course the * will be taken literally here cause I define it as a string, so this does not work, but you know what I would like to accomplish: for the A, B and D cases the numbers can be whatever (*). Maybe with preg_match this is possible but that really blows my head. I Googled, I really did.</p>