title: Regular expression for matching SNMP traps
body: <p>I have an snmptrapd daemon running in the background and logging all the traps to a file, and <strong>I am trying to parse that log in a perl program</strong>.</p>
  
  <p>The SNMP v2c traps are being logged as follows:</p>
  
  <pre><code>SNMPv2[**]2013-11-4[**]13:16:49[**]UDP: [127.0.0.1]:57819-&gt;[127.0.0.1][**].1.3.6.1.6.3.1.1.4.1.0 = OID: .1.3.6.1.4.1.8072.2.3.0.1       .1.3.6.1.4.1.8072.2.3.2.1 = INTEGER: 30 .1.3.6.1.4.1.8072.2.3.2.2 = STRING: lol
  </code></pre>
  
  <p>I have successfully parsed the OID, and the remote IP address using regular expressions, but I am unable to parse all the remaining trap values. Those are:</p>
  
  <pre><code>.1.3.6.1.4.1.8072.2.3.2.1 = INTEGER: 30 .1.3.6.1.4.1.8072.2.3.2.2 = STRING: lol
  </code></pre>
  
  <p>The syntax seems easy: TRAP_STUFF = TYPE: VALUE repeated 0 or more times.</p>
  
  <p>So the question is <strong>which regular expression will allow me to grab all this information?</strong></p>