title: Match all substrings that end with 4 digits using regular expressions
body: <p>I am trying to split a string in php, which looks like this:</p>
  
  <pre><code>ABCDE1234ABCD1234ABCDEF1234
  </code></pre>
  
  <p>Into an array of string which, in this case, would look like this:</p>
  
  <pre><code>ABCDE1234
  ABCD1234
  ABCDEF1234
  </code></pre>
  
  <p>So the pattern is "an undefined number of letters, and then 4 digits, then an undefined number of letters and 4 digits etc."</p>
  
  <p>I'm trying to split the string using preg_split like this:</p>
  
  <pre><code>$pattern = "#[0-9]{4}$#";
  preg_split($pattern, $stringToSplit);
  </code></pre>
  
  <p>And it returns an array containing the full string (not split) in the first element.</p>
  
  <p>I'm guessing the problem here is my regex as I don't fully understand how to use them, and I am not sure if I'm using it correctly.</p>
  
  <p>So what would be the correct regex to use?</p>