title: how to validate the first four character in string using php?
body: <p>I want to make script that only accept the ff;</p>
  
  <ul>
  <li>1st, 2nd, and 3rd character from a word/string/paragraph == ABC;</li>
  <li>4th
  character from a word/string/paragraph == asterisk(*);</li>
  <li>5th to 20th from accept only a numeric integer...</li>
  </ul>
  
  <p>
  
  <pre><code>&lt;?php
  
      $subject = "das*3445465656343";
      $pattern = '/^[ABCabc]{3}$/';
      preg_match_all($pattern, $subject, $matches, PREG_OFFSET_CAPTURE);
  
  ?&gt;
  </code></pre>