title: Parse string with XSLT containing multiple types
body: <p>I have a string that can contain multiple codes, such as LP or 1S. I essentially need to be able to search this string for a list of values (LP|1S). </p>
  
  <p>These values are always variable and if a certain code appears, then I need to sub-string after it to get additional data according to certain mapping. </p>
  
  <p>For instance, after LP is the type (LP), the week (1), date, bus (0800) and location (1884). </p>
  
  <p>See code below:</p>
  
  <p>I was thinking of using if ... contains LP, then sub-string. However, I can only sub-string once on the text. Could I maybe use a for each and continue to sub-string until the end of the string?</p>
  
  <pre><code>LP12018122908001884CA212345LP120181229080018841S12345
  
  &lt;root&gt;
    &lt;entry&gt;
     &lt;type&gt;LP&lt;/type&gt;
     &lt;week&gt;1&lt;/week&gt;
     &lt;date&gt;20181229&lt;/date&gt;
     &lt;location&gt;08001884&lt;/location&gt;
    &lt;entry&gt;
    &lt;entry&gt;
     &lt;type&gt;CA&lt;/type&gt;
     &lt;week&gt;2&lt;/week&gt;
     &lt;location&gt;212345&lt;/location&gt;
    &lt;entry&gt;
    &lt;entry&gt;
     &lt;type&gt;LP&lt;/type&gt;
     &lt;week&gt;1&lt;/week&gt;
     &lt;date&gt;20181229&lt;/date&gt;
     &lt;location&gt;08001884&lt;/location&gt;
    &lt;entry&gt;
    &lt;entry&gt;
     &lt;type&gt;1S&lt;/type&gt;
     &lt;location&gt;12345&lt;/location&gt;
    &lt;entry&gt;
  &lt;/root&gt;
  </code></pre>