<?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: Regex on search output? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-on-search-output/m-p/86291#M22005</link>
    <description>&lt;P&gt;The second one gives me the lines with what I'm looking for, when I choose 'View Source', it's giving me the full line and not the extracted data from each line. Can I do that?&lt;/P&gt;</description>
    <pubDate>Fri, 05 Apr 2013 17:16:36 GMT</pubDate>
    <dc:creator>jcmaynard2</dc:creator>
    <dc:date>2013-04-05T17:16:36Z</dc:date>
    <item>
      <title>Regex on search output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-on-search-output/m-p/86289#M22003</link>
      <description>&lt;P&gt;Search: index=XXX source=/xxx/xxx/xxxx.log | regex 'something'&lt;/P&gt;

&lt;P&gt;How would I do this properly showing just the regexed output?&lt;/P&gt;

&lt;P&gt;Thanks...&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2013 16:58:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-on-search-output/m-p/86289#M22003</guid>
      <dc:creator>jcmaynard</dc:creator>
      <dc:date>2013-04-05T16:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Regex on search output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-on-search-output/m-p/86290#M22004</link>
      <description>&lt;P&gt;So there are two ways.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;CODE&gt;index=xx source=/xx.log | rex field=your_field "(?&amp;lt;your_new_field&amp;gt;REGEX)"| table your_new_field&lt;/CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;This shows only the value of the captured regex.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;&lt;CODE&gt;index=xx source=/xx.log | regex _raw="REGEX"&lt;/CODE&gt;&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;This keeps only the events that match REGEX.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Regex" target="test_blank"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Regex&lt;/A&gt;&lt;/CODE&gt;&lt;BR /&gt;
&lt;CODE&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rex" target="test_blank"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rex&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2013 17:08:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-on-search-output/m-p/86290#M22004</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2013-04-05T17:08:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regex on search output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-on-search-output/m-p/86291#M22005</link>
      <description>&lt;P&gt;The second one gives me the lines with what I'm looking for, when I choose 'View Source', it's giving me the full line and not the extracted data from each line. Can I do that?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2013 17:16:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-on-search-output/m-p/86291#M22005</guid>
      <dc:creator>jcmaynard2</dc:creator>
      <dc:date>2013-04-05T17:16:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regex on search output?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-on-search-output/m-p/86292#M22006</link>
      <description>&lt;P&gt;You can either use the first method and then filter out events where "your_new_field" is null (because the regex didn't match anything). Or you could run the second command given to filter out the relevant events, and then pipe that to the first command to actually do the extraction.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:40:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-on-search-output/m-p/86292#M22006</guid>
      <dc:creator>rtadams89</dc:creator>
      <dc:date>2020-09-28T13:40:59Z</dc:date>
    </item>
  </channel>
</rss>

