title: Extracting parts of a string using Regex
body: <p>I have several strings that look like the following:</p>
  
  <blockquote>
    <p>+H124005992014011/1527399999999I05Z</p>
    
    <p>+H7039700000001/$99999999I051</p>
    
    <p>+K122005962050171/120911234C117</p>
  </blockquote>
  
  <p>I need each section to be split into its own variable. To do this i thought Regex would be the best way to go. </p>
  
  <p>here are the rules for splitting.</p>
  
  <ul>
  <li>The first char must be the '+'</li>
  <li>The second section must have an alpha char followed by three digits. i.e. H124, H703, K122</li>
  <li>The third section is a set of alphanumeric chars (1 to 13 chars in length)</li>
  <li>The fourth section is a single decimal digit (0 to 9)</li>
  <li>The fifth section must be the '/' char</li>
  <li>The sixth section is an explicit five digit Julian date code</li>
  <li>The seventh section is a 0 to 13 alphanumeric string</li>
  <li>The eighth section must have an alpha char (A to L) followed by two digits</li>
  <li>and the ninth section is a single alphanumeric char</li>
  </ul>
  
  <p>I have the following Regex pattern which seems to match the strings fine but i am unsure how to turn this full pattern into a string and robust way of splitting these strings....</p>
  
  <pre><code>(^\+)(\D\d\d\d)(\w{1,13})(\d)(\/)(\d{5}|\$)(\w{0,13})\D\d\d\w$
  </code></pre>
  
  <p>I need to turn the above pattern into a form that will allow me to extract each of the matching sections screens.</p>
  
  <p>Thanks in advance</p>