title: Detect specific string structure with numeric shortform date pattern
body: <p>I'm struggling to write a suitable Regex to detect a string which includes a specific pattern (version number) and a short form date. This string comes from a Serialport in an Electron app I'm building.</p>
  
  <p>The string is in the below three patterns based on the hardware which responds, but is often in between <code>\r\n</code> and possibly other strings:</p>
  
  <p><code>MyHardwareName Vn.nn dd/mm/yy</code> ⇒ (MyHardware V1.23 01/02/03)<br>
  <code>MyHardwareName Vnn.nn dd/mm/yy</code> ⇒ (MyHardware V12.34 01/02/03)<br>
  <code>MyHardwareName Vn.nn dd/mm/yyyy</code> ⇒ (MyHardware V1.23 01/02/2003)<br>
  <code>MyHardwareName Vnn.nn dd/mm/yyyy</code> ⇒ (MyHardware V12.34 01/02/2003)  </p>
  
  <p>The closest I've got so far is by just detecting the date and manually processing after and looking for a string starting with the transmitted command up to the CRLF. This isn't reliable and I sometimes end up with pieces of the next line. Not to mention, the <code>.split()</code> returns the match in multiple pieces which isn't ideal.</p>
  
  <h2>My Attempts</h2>
  
  <h3>Data response to run regex on</h3>
  
  <pre><code>hardware -v
  ...(need to ignore junk here in case there is any)
  MyHardware V1.23 01/02/20     (This is the only line I need)
  PROCESSOR:xxxxxxxxxx
  abc &lt;n&gt; &lt;c&gt; [r]     
  def &lt;n&gt; &lt;c&gt; [r]     
  ...
  </code></pre>
  
  <h3>Regex:</h3>
  
  <p><code>/([0-2][0-9]|(3)[0-1])(\/)(((0)[0-9])|((1)[0-2]))(\/)\d{0,2}/</code>
  -> Consistently captures the line after the date too</p>
  
  <p><code>/(hardware -v\s+)(.*)(\r\n)/</code>
  → Returns:</p>
  
  <pre><code>["hardware -v", "My ", "Hardware V1.10 06/02/15", "
  ↵PROCESSOR:SAMD51J19A"]
  </code></pre>
  
  <p>Ultimately I want to be able to split a string with a regex and obtain "MyHardware V1.10 06/02/15" (or one of the above variations where version is 2 digits and the year being 4 digits). </p>
  
  <p>Can anybody advise on if this is possible to do in one Regex?</p>