<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to Combine Two Regex to Form One Variable in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-Combine-Two-Regex-to-Form-One-Variable/m-p/240558#M71505</link>
    <description>&lt;P&gt;it worked perfectly. Thanks a lot sir!&lt;/P&gt;</description>
    <pubDate>Tue, 11 Oct 2016 02:40:36 GMT</pubDate>
    <dc:creator>jepoyyyy</dc:creator>
    <dc:date>2016-10-11T02:40:36Z</dc:date>
    <item>
      <title>How to Combine Two Regex to Form One Variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Combine-Two-Regex-to-Form-One-Variable/m-p/240556#M71503</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I have events similar to these:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;[10-10-16 18:29:20:057]::TrxThread(A2571700)::DTRACE: Lock acquired for 1000000001&lt;/STRONG&gt;&lt;BR /&gt;
&lt;STRONG&gt;[10-10-16 18:29:20:054]::TrxThread(A2571700)::DTRACE: Lock freed for 1000000001&lt;/STRONG&gt;&lt;BR /&gt;
&lt;STRONG&gt;[10-10-16 18:29:20:057]::TrxThread(A2571700)::DTRACE: Lock acquired for 1000000002&lt;/STRONG&gt;&lt;BR /&gt;
&lt;STRONG&gt;[10-10-16 18:29:20:054]::TrxThread(A2571700)::DTRACE: Lock freed for 1000000002&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;My objective is to extract &lt;STRONG&gt;TrxThread&lt;/STRONG&gt; and &lt;STRONG&gt;subsNumber&lt;/STRONG&gt; (ex. 1000000001) and combine them into one variable so that I could differentiate each transaction even though they have the same &lt;STRONG&gt;TrxThread&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;My end goal is to measure the duration so I'll be using the search below once I get the combined transaction thread and subs number&lt;BR /&gt;
&lt;STRONG&gt;&lt;EM&gt;| stats earliest(_time) as start latest(_time) as end by combined_trx_id | eval dur=end-start&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;

&lt;P&gt;Kindest regards,&lt;BR /&gt;
Jeff&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:21:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Combine-Two-Regex-to-Form-One-Variable/m-p/240556#M71503</guid>
      <dc:creator>jepoyyyy</dc:creator>
      <dc:date>2020-09-29T11:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to Combine Two Regex to Form One Variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Combine-Two-Regex-to-Form-One-Variable/m-p/240557#M71504</link>
      <description>&lt;P&gt;Try like this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.... | rex "Thread\((?&amp;lt;tid&amp;gt;\w+).*for\s(?&amp;lt;id&amp;gt;\d+)$" | eval combined_trx_id=tid."::".id
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Oct 2016 12:19:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Combine-Two-Regex-to-Form-One-Variable/m-p/240557#M71504</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-10T12:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to Combine Two Regex to Form One Variable</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-Combine-Two-Regex-to-Form-One-Variable/m-p/240558#M71505</link>
      <description>&lt;P&gt;it worked perfectly. Thanks a lot sir!&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 02:40:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-Combine-Two-Regex-to-Form-One-Variable/m-p/240558#M71505</guid>
      <dc:creator>jepoyyyy</dc:creator>
      <dc:date>2016-10-11T02:40:36Z</dc:date>
    </item>
  </channel>
</rss>

