title: python find all matches of multiple strings in a given string using regex?
body: <p>I have a string of the below pattern.</p>
  <pre><code>string = &quot;'L3-OPS-AB-1499', 'L3-RBP_C-449', 'L2-COM-310', 'L2-PLT-16796'&quot;
  </code></pre>
  <p>My requirement is for a regular expression to find all the occurrences of following patterns as below</p>
  <blockquote>
  <p>a string starting with <strong>L</strong></p>
  <p>followed by a <strong>number</strong></p>
  <p>a <strong>hyphen</strong></p>
  <p>then special <strong>keywords</strong> like <strong>&quot;OPS-AB&quot; or &quot;PLT&quot; or &quot;COM&quot;</strong></p>
  <p>then a hyphen</p>
  <p>followed by a number</p>
  </blockquote>
  <p>ex: L3-OPS-AB-1499</p>
  <p>I tried the below regex but it gives a partial result</p>
  <pre><code>regex = re.search(&quot;L\d-(OPS|RBP_|-AB|C)|(COM|PLT)-\d+&quot;,string)
  </code></pre>
  <h1>my output</h1>
  <pre><code>'COM-310'
  </code></pre>
  <h1>expected output</h1>
  <pre><code>'L3-OPS-AB-1499', 'L3-RBP_C-449', 'L2-COM-310', 'L2-PLT-16796'
  </code></pre>
  <p>Any help will be appreciated, thanks</p>