title: How to capture a multiple patterns using regex?
body: <p>I have several text files, containing error values. The values are different in each file and so i'm not able to get the exact line where the value is present. </p>
  
  <p>The example is as follows:</p>
  
  <pre><code>v1 = 1111
  v2 = A:10 B:2
  </code></pre>
  
  <p>Text:</p>
  
  <pre><code>12.10.08,11:12:39,183769  1111,10352,003,12,11:12:39,183 Syntax--&gt;12345
  </code></pre>
  
  <p>(would like to capture v1)</p>
  
  <pre><code>01.01.02,06:10:56,243648  00488,00000,018,01,06:10:56,243 A:10 B:2--1212 (would like to capture v2)
  </code></pre>
  
  <p>The regex is as follows:</p>
  
  <pre><code>((\d{2}[.]\d{2}[.]\d{2}),(\d{2}[:]\d{2}[:]\d{2},\d*\s*(('+v1+')[,].*|\S*\s('+v2+')).*))
  </code></pre>
  
  <p>Irrespective of the value passed, it should go through text and grab the value. If v1 is present, should provide the complete text and if v2 is present the same. 
  But with one regex equation.</p>