<?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 How to use regex to extract field? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-extract-field/m-p/333890#M99275</link>
    <description>&lt;P&gt;HI How to extract the field with space using regex?&lt;/P&gt;

&lt;P&gt;name:&lt;BR /&gt;
T11345DDF ERROR&lt;BR /&gt;
T11345SSDF Volume C&lt;/P&gt;

&lt;P&gt;values:&lt;BR /&gt;
123455-25335535-55454545-5656566-45655-36565656-6656-488656 TPM&lt;/P&gt;

&lt;P&gt;I need to extract T11345DDF , T11345SSDF , 123455-25335535-55454545-5656566-45655-36565656-6656-488656&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jul 2017 18:06:21 GMT</pubDate>
    <dc:creator>kiran331</dc:creator>
    <dc:date>2017-07-26T18:06:21Z</dc:date>
    <item>
      <title>How to use regex to extract field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-extract-field/m-p/333890#M99275</link>
      <description>&lt;P&gt;HI How to extract the field with space using regex?&lt;/P&gt;

&lt;P&gt;name:&lt;BR /&gt;
T11345DDF ERROR&lt;BR /&gt;
T11345SSDF Volume C&lt;/P&gt;

&lt;P&gt;values:&lt;BR /&gt;
123455-25335535-55454545-5656566-45655-36565656-6656-488656 TPM&lt;/P&gt;

&lt;P&gt;I need to extract T11345DDF , T11345SSDF , 123455-25335535-55454545-5656566-45655-36565656-6656-488656&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 18:06:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-extract-field/m-p/333890#M99275</guid>
      <dc:creator>kiran331</dc:creator>
      <dc:date>2017-07-26T18:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to use regex to extract field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-extract-field/m-p/333891#M99276</link>
      <description>&lt;P&gt;Let's say that it is always the first word in each event line then can you try this please:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your query to return events
| rex "^(?&amp;lt;myField&amp;gt;[^\s]+)\s*"
| table myField
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;See extraction &lt;A href="https://regex101.com/r/R4RdZ8/1"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 18:16:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-extract-field/m-p/333891#M99276</guid>
      <dc:creator>gokadroid</dc:creator>
      <dc:date>2017-07-26T18:16:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to use regex to extract field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-extract-field/m-p/333892#M99277</link>
      <description>&lt;P&gt;Thanks gokadroid.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 18:23:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-extract-field/m-p/333892#M99277</guid>
      <dc:creator>kiran331</dc:creator>
      <dc:date>2017-07-26T18:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use regex to extract field?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-extract-field/m-p/333893#M99278</link>
      <description>&lt;P&gt;If you need more flexibility you might need to create fields extractions. If it was me, I would create 3 separate field extractions.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;- (?P&amp;lt;error&amp;gt;.*?)\sERROR
- (?P&amp;lt;volume&amp;gt;.*?)\sVolume
- (?P&amp;lt;tpm&amp;gt;.*?)\sTPM
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 27 Jul 2017 17:59:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-regex-to-extract-field/m-p/333893#M99278</guid>
      <dc:creator>rbreton</dc:creator>
      <dc:date>2017-07-27T17:59:46Z</dc:date>
    </item>
  </channel>
</rss>

