title: How to Split String Using Regex Expressions
body: <p>I have a string <code>"323 ECO Economics Course 451 ENG English Course 789 Mathematical Topography"</code> I want to split this string using the regex expression <code>[0-9][0-9][0-9][A-Z][A-Z][A-Z]</code> so that the function returns the array:</p>
  
  <pre><code>Array = 
  ["323 ECO Economics Course ", "451 ENG English Course",  "789 Mathematical Topography"]
  </code></pre>
  
  <p>How would I go about doing this using swift?</p>
  
  <p><strong>Edit</strong>
  My question is different than the one linked to. I realize that you can split a string in swift using <code>myString.components(separatedBy: "splitting string")</code> The issue is that that question doesn't address how to make the <code>splitting string</code> a regex expression. I tried using <code>mystring.components(separatedBy: "[0-9][0-9][0-9][A-Z][A-Z][A-Z]", options: .regularExpression)</code> but that didn't work. </p>
  
  <p><em>How can I make the <code>separatedBy:</code> portion a regular expression?</em></p>