<?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: Help on construct rex expression in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123305#M33285</link>
    <description>&lt;P&gt;Hello &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;After status I need to consider the whole value:&lt;/P&gt;

&lt;P&gt;status=&lt;STRONG&gt;bounced (host xxx.com[x.x.x.x] said: 550 No Such User Here" (in reply to RCPT TO command))&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Can I have this in 1 field?&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 31 Oct 2013 15:44:22 GMT</pubDate>
    <dc:creator>mariaerh</dc:creator>
    <dc:date>2013-10-31T15:44:22Z</dc:date>
    <item>
      <title>Help on construct rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123302#M33282</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;

&lt;P&gt;From a search in Splunk I get this output from the _raw field:&lt;/P&gt;

&lt;H2&gt;(I have modified a bit the output for privace)&lt;/H2&gt;

&lt;P&gt;_raw&lt;BR /&gt;
Oct 27 18:03:25 index-name-here postfix/smtp[xxxx]: 00000000000: to=&lt;A href="mailto:xxx@xxx.com"&gt;xxx@xxx.com&lt;/A&gt;, relay=xxx.com[x.x.x.x]:xx, delay=0.00, delays=0.00/0.00/0.0/0.00, dsn=0.0.0, status=bounced (host xxx.com[x.x.x.x] said: 550 No Such User Here" (in reply to RCPT TO command))&lt;/P&gt;

&lt;P&gt;I need to extract this info from the raw data:&lt;BR /&gt;
status=bounced (host xxx.com[x.x.x.x] said: 550 No Such User Here" (some-text-here))&lt;/P&gt;

&lt;P&gt;How can I do that using a rex expression on the search?&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2013 22:08:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123302#M33282</guid>
      <dc:creator>mariaerh</dc:creator>
      <dc:date>2013-10-30T22:08:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help on construct rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123303#M33283</link>
      <description>&lt;P&gt;What after status=bounced does the rex need to consider?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2013 22:16:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123303#M33283</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2013-10-30T22:16:48Z</dc:date>
    </item>
    <item>
      <title>Re: Help on construct rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123304#M33284</link>
      <description>&lt;P&gt;just what do you want to have? all in one field;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;...| rex "(?&amp;lt;my_long_field&amp;gt;status=.*)$"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or do you want several smaller pieces?&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2013 23:21:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123304#M33284</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-10-30T23:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Help on construct rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123305#M33285</link>
      <description>&lt;P&gt;Hello &lt;span class="lia-unicode-emoji" title=":grinning_face_with_big_eyes:"&gt;😃&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;After status I need to consider the whole value:&lt;/P&gt;

&lt;P&gt;status=&lt;STRONG&gt;bounced (host xxx.com[x.x.x.x] said: 550 No Such User Here" (in reply to RCPT TO command))&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Can I have this in 1 field?&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 15:44:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123305#M33285</guid>
      <dc:creator>mariaerh</dc:creator>
      <dc:date>2013-10-31T15:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help on construct rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123306#M33286</link>
      <description>&lt;P&gt;You can grab from status to the end of the line like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;rex "status\=(?&amp;lt;Status&amp;gt;.*)"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;OR just the single word like this:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;rex "status\=(?&amp;lt;Status&amp;gt;\w)"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 15:46:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123306#M33286</guid>
      <dc:creator>adylent</dc:creator>
      <dc:date>2013-10-31T15:46:00Z</dc:date>
    </item>
    <item>
      <title>Re: Help on construct rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123307#M33287</link>
      <description>&lt;P&gt;didn't the &lt;CODE&gt;rex&lt;/CODE&gt; above work?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 15:47:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123307#M33287</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-10-31T15:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Help on construct rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123308#M33288</link>
      <description>&lt;P&gt;Thanks all for the answers, I will try and let you know.&lt;/P&gt;

&lt;P&gt;One last question, don't I have to include this "field=_raw" right after the command rex ?&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 15:57:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123308#M33288</guid>
      <dc:creator>mariaerh</dc:creator>
      <dc:date>2013-10-31T15:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Help on construct rex expression</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123309#M33289</link>
      <description>&lt;P&gt;no, that's default behaviour. no need to specify.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2013 15:59:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-on-construct-rex-expression/m-p/123309#M33289</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-10-31T15:59:18Z</dc:date>
    </item>
  </channel>
</rss>

