<?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: What is the regular expression to extract &amp;quot;a1234567&amp;quot; from my event? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-extract-quot-a1234567-quot/m-p/286470#M86749</link>
    <description>&lt;P&gt;I would consider using the &lt;CODE&gt;split&lt;/CODE&gt; and &lt;CODE&gt;mvindex&lt;/CODE&gt; commands for this, assuming INDV is being extracted already:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval my_field=mvindex(split(INDV,"|"),2)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=INDV "RSPAR\|(?[^|]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But that really depends on the consistency of the data around your target extraction.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Feb 2017 15:12:55 GMT</pubDate>
    <dc:creator>twinspop</dc:creator>
    <dc:date>2017-02-06T15:12:55Z</dc:date>
    <item>
      <title>What is the regular expression to extract "a1234567" from my event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-extract-quot-a1234567-quot/m-p/286468#M86747</link>
      <description>&lt;P&gt;Please help me with regular expression&lt;BR /&gt;
i want to extract          &lt;CODE&gt;a1234567&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"INDV=1234566|RSPAR|a1234567|RSPAR"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 06 Feb 2017 15:03:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-extract-quot-a1234567-quot/m-p/286468#M86747</guid>
      <dc:creator>sravankaripe</dc:creator>
      <dc:date>2017-02-06T15:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regular expression to extract "a1234567" from my event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-extract-quot-a1234567-quot/m-p/286469#M86748</link>
      <description>&lt;P&gt;hi sravankaripe,&lt;BR /&gt;
you can use it on row events&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\d+\|\w+\|(?&amp;lt;your_field&amp;gt;[^\|]*)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or using a rex command&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=INDV "\d+\|\w+\|(?&amp;lt;your_field&amp;gt;[^\|]*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can see it at &lt;A href="https://regex101.com/r/Ve484u/1"&gt;https://regex101.com/r/Ve484u/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 15:09:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-extract-quot-a1234567-quot/m-p/286469#M86748</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-02-06T15:09:29Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regular expression to extract "a1234567" from my event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-extract-quot-a1234567-quot/m-p/286470#M86749</link>
      <description>&lt;P&gt;I would consider using the &lt;CODE&gt;split&lt;/CODE&gt; and &lt;CODE&gt;mvindex&lt;/CODE&gt; commands for this, assuming INDV is being extracted already:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval my_field=mvindex(split(INDV,"|"),2)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;With regex:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=INDV "RSPAR\|(?[^|]+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;But that really depends on the consistency of the data around your target extraction.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 15:12:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-extract-quot-a1234567-quot/m-p/286470#M86749</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2017-02-06T15:12:55Z</dc:date>
    </item>
    <item>
      <title>Re: What is the regular expression to extract "a1234567" from my event?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-extract-quot-a1234567-quot/m-p/286471#M86750</link>
      <description>&lt;P&gt;| rex field=_raw "\d+|\w+|(?[^|]*)" &lt;BR /&gt;
this worked for me Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2017 15:12:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-is-the-regular-expression-to-extract-quot-a1234567-quot/m-p/286471#M86750</guid>
      <dc:creator>sravankaripe</dc:creator>
      <dc:date>2017-02-06T15:12:59Z</dc:date>
    </item>
  </channel>
</rss>

