<?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 do I use rex command here ? in Splunk Dev</title>
    <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-use-rex-command-here/m-p/432750#M7767</link>
    <description>&lt;P&gt;Please try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   | makeresults 
    | eval data="2018-05-31 13:05:32.673, SQL_ID=\"5y1v8tznxf4t1\", DBID=\"3602297620\", SQL_TEXT=\"SELECT \"MBLNR\",\"MJAHR\",\"BWART\",\"MATNR\",\"WERKS\",\"LGORT\",\"WAERS\",\"DMBTR\",\"MENGE\",\"SGTXT\",\"GRUND\",\"BUDAT_MKPF\",\"USNAM_MKPF\" FROM \"MSEG\" WHERE \"MANDT\"=:A0 AND \"BUDAT_MKPF\" BETWEEN :A1 AND :A2 AND \"WERKS\"=:A3 AND \"BWART\" BETWEEN :A4 AND :A5\", ELAPSED_TIME=\"2876.465675\", TOTAL_TIME=\"5752.93135\", EXEC=\"2"
    | rex field=data ", ELAPSED_TIME=\"(?&amp;lt;numValue&amp;gt;\d+\.\d+)\""
    | table data,numValue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 31 May 2018 12:34:16 GMT</pubDate>
    <dc:creator>poete</dc:creator>
    <dc:date>2018-05-31T12:34:16Z</dc:date>
    <item>
      <title>How do I use rex command here ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-use-rex-command-here/m-p/432748#M7765</link>
      <description>&lt;P&gt;Following is the sample event:&lt;/P&gt;

&lt;P&gt;2018-05-31 13:05:32.673, SQL_ID="5y1v8tznxf4t1", DBID="3602297620", SQL_TEXT="SELECT "MBLNR","MJAHR","BWART","MATNR","WERKS","LGORT","WAERS","DMBTR","MENGE","SGTXT","GRUND","BUDAT_MKPF","USNAM_MKPF" FROM "MSEG" WHERE "MANDT"=:A0 AND "BUDAT_MKPF" BETWEEN :A1 AND :A2 AND "WERKS"=:A3 AND "BWART" BETWEEN :A4 AND :A5", &lt;STRONG&gt;ELAPSED_TIME&lt;/STRONG&gt;="2876.465675", TOTAL_TIME="5752.93135", EXEC="2"&lt;/P&gt;

&lt;P&gt;Required Field is in bold. &lt;BR /&gt;
I want ELAPSED_TIME as field and its value.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:47:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-use-rex-command-here/m-p/432748#M7765</guid>
      <dc:creator>harshal94</dc:creator>
      <dc:date>2020-09-29T19:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use rex command here ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-use-rex-command-here/m-p/432749#M7766</link>
      <description>&lt;P&gt;This should do the trick:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "ELAPSED_TIME=\"(?&amp;lt;ELAPSED_TIME&amp;gt;[^\"]+)\"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 May 2018 12:15:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-use-rex-command-here/m-p/432749#M7766</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-05-31T12:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I use rex command here ?</title>
      <link>https://community.splunk.com/t5/Splunk-Dev/How-do-I-use-rex-command-here/m-p/432750#M7767</link>
      <description>&lt;P&gt;Please try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;   | makeresults 
    | eval data="2018-05-31 13:05:32.673, SQL_ID=\"5y1v8tznxf4t1\", DBID=\"3602297620\", SQL_TEXT=\"SELECT \"MBLNR\",\"MJAHR\",\"BWART\",\"MATNR\",\"WERKS\",\"LGORT\",\"WAERS\",\"DMBTR\",\"MENGE\",\"SGTXT\",\"GRUND\",\"BUDAT_MKPF\",\"USNAM_MKPF\" FROM \"MSEG\" WHERE \"MANDT\"=:A0 AND \"BUDAT_MKPF\" BETWEEN :A1 AND :A2 AND \"WERKS\"=:A3 AND \"BWART\" BETWEEN :A4 AND :A5\", ELAPSED_TIME=\"2876.465675\", TOTAL_TIME=\"5752.93135\", EXEC=\"2"
    | rex field=data ", ELAPSED_TIME=\"(?&amp;lt;numValue&amp;gt;\d+\.\d+)\""
    | table data,numValue
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 May 2018 12:34:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Dev/How-do-I-use-rex-command-here/m-p/432750#M7767</guid>
      <dc:creator>poete</dc:creator>
      <dc:date>2018-05-31T12:34:16Z</dc:date>
    </item>
  </channel>
</rss>

