<?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: Trying to  extract some value only particular string but it is also giving the unmatched string based on the path  of the string... in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Trying-to-extract-some-value-only-particular-string-but-it-is/m-p/452573#M55656</link>
    <description>&lt;P&gt;Can you post your search string?&lt;/P&gt;</description>
    <pubDate>Sun, 30 Jun 2019 18:54:36 GMT</pubDate>
    <dc:creator>memarshall63</dc:creator>
    <dc:date>2019-06-30T18:54:36Z</dc:date>
    <item>
      <title>Trying to  extract some value only particular string but it is also giving the unmatched string based on the path  of the string...</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Trying-to-extract-some-value-only-particular-string-but-it-is/m-p/452570#M55653</link>
      <description>&lt;P&gt;Trying to  extract some value only particular string but it is also giving the unmatched string based on the path  of the string...&lt;/P&gt;

&lt;P&gt;I want to extract only this &lt;STRONG&gt;validation&lt;/STRONG&gt; string but not &lt;STRONG&gt;()&lt;/STRONG&gt; valus which is there in the second event..&lt;/P&gt;

&lt;P&gt;[2/26/19 03:22:29:506 CEST] 0000001f monitor O 2019-06-26 14:22:29,506 [newstp - validation - NEW] &lt;/P&gt;

&lt;P&gt;[2/26/19 03:28:17:829 CEST] 00000023 monitor O INFO 2019-06-26 14:28:17.829 &lt;A href="https://community.splunk.com/"&gt;activity&lt;/A&gt;;&lt;/P&gt;

&lt;P&gt;Here is the Regex which I'm using :^(?:[^ \n]* ){10}(?P[^ ]+)&lt;/P&gt;

&lt;P&gt;Please help me to extract only &lt;STRONG&gt;validation&lt;/STRONG&gt; string, not the empty string..&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2019 14:48:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Trying-to-extract-some-value-only-particular-string-but-it-is/m-p/452570#M55653</guid>
      <dc:creator>nareshchenchati</dc:creator>
      <dc:date>2019-06-30T14:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to  extract some value only particular string but it is also giving the unmatched string based on the path  of the string...</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Trying-to-extract-some-value-only-particular-string-but-it-is/m-p/452571#M55654</link>
      <description>&lt;P&gt;Here's a string that will get you the value of the validation string:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\[newstp\s-\svalidation\s-\s(?P&amp;lt;fld&amp;gt;.+)\]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This just looks for the string "[newstp - validation - and captures the next word before the ],&lt;BR /&gt;
-or, did you mean it's giving you the () and you always want the bits in between the []'s?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;.*\[(?P&amp;lt;fld&amp;gt;.+)\]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This looks for the square brackets and captues what's between them.&lt;/P&gt;

&lt;P&gt;I used 'fld' as the field name where you should find the captured bits.&lt;/P&gt;

&lt;P&gt;Hope that helps.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2019 17:50:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Trying-to-extract-some-value-only-particular-string-but-it-is/m-p/452571#M55654</guid>
      <dc:creator>memarshall63</dc:creator>
      <dc:date>2019-06-30T17:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to  extract some value only particular string but it is also giving the unmatched string based on the path  of the string...</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Trying-to-extract-some-value-only-particular-string-but-it-is/m-p/452572#M55655</link>
      <description>&lt;P&gt;Thanks for the reply.. I'm unable to get the output.. it says "Regex: missing terminating" while testing...&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2019 18:25:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Trying-to-extract-some-value-only-particular-string-but-it-is/m-p/452572#M55655</guid>
      <dc:creator>nareshchenchati</dc:creator>
      <dc:date>2019-06-30T18:25:33Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to  extract some value only particular string but it is also giving the unmatched string based on the path  of the string...</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Trying-to-extract-some-value-only-particular-string-but-it-is/m-p/452573#M55656</link>
      <description>&lt;P&gt;Can you post your search string?&lt;/P&gt;</description>
      <pubDate>Sun, 30 Jun 2019 18:54:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Trying-to-extract-some-value-only-particular-string-but-it-is/m-p/452573#M55656</guid>
      <dc:creator>memarshall63</dc:creator>
      <dc:date>2019-06-30T18:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to  extract some value only particular string but it is also giving the unmatched string based on the path  of the string...</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Trying-to-extract-some-value-only-particular-string-but-it-is/m-p/452574#M55657</link>
      <description>&lt;P&gt;Here's my search: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/tmp/splunk_ingest/*" host="/tmp/splunk_ingest" index="sandbox" sourcetype="rando_file" 
| rex field=_raw "\[newstp\s-\svalidation\s-\s(?P&amp;lt;fld&amp;gt;.+)\]"
| rex field=_raw ".*\[(?P&amp;lt;fld2&amp;gt;.+)\]" 
| table _time _raw fld fld2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;and my results (in CSV):&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time","_raw",fld,fld2
"2019-06-25T21:28:17.829-0400","[2/26/19 03:28:17:829 CEST] 00000023 monitor O INFO 2019-06-26 14:28:17.829 [activity] ();",,activity
"2019-06-25T21:22:29.506-0400","[2/26/19 03:22:29:506 CEST] 0000001f monitor O 2019-06-26 14:22:29,506 [newstp - validation - NEWSTP$46359]","NEWSTP$46359","newstp - validation - NEWSTP$46359"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 30 Jun 2019 20:47:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Trying-to-extract-some-value-only-particular-string-but-it-is/m-p/452574#M55657</guid>
      <dc:creator>memarshall63</dc:creator>
      <dc:date>2019-06-30T20:47:26Z</dc:date>
    </item>
  </channel>
</rss>

