<?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 rex not working for log4j in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/rex-not-working-for-log4j/m-p/62461#M15420</link>
    <description>&lt;P&gt;trying to extract COMPANY from each matched log line, given tomcat log4j lines like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;31 Jan 2012 23:59:39,963 [com.action.ProcessPassword] (TP-Processor87) (8e48955b5d66036:24.6.170.156) DEBUG: Started executeExternalProcessPassword() for name @ COMPANY
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;why doesn't this rex work?  (no results)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="myIndex" rex field=_raw "executeExternalProcessPassword.* @ (?&amp;lt;org&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;just &lt;CODE&gt;index="myIndex" "executeExternalProcessPassword"&lt;/CODE&gt; returns 22k+ lines from just one day log span&lt;/P&gt;

&lt;P&gt;this works perfectly:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;perl -ne 'if (/executeExternalProcessPassword.*@(.+)$/) {print "$1\n"}' catalina.out
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 01 Feb 2012 20:57:59 GMT</pubDate>
    <dc:creator>pcorchary</dc:creator>
    <dc:date>2012-02-01T20:57:59Z</dc:date>
    <item>
      <title>rex not working for log4j</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-not-working-for-log4j/m-p/62461#M15420</link>
      <description>&lt;P&gt;trying to extract COMPANY from each matched log line, given tomcat log4j lines like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;31 Jan 2012 23:59:39,963 [com.action.ProcessPassword] (TP-Processor87) (8e48955b5d66036:24.6.170.156) DEBUG: Started executeExternalProcessPassword() for name @ COMPANY
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;why doesn't this rex work?  (no results)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="myIndex" rex field=_raw "executeExternalProcessPassword.* @ (?&amp;lt;org&amp;gt;.*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;just &lt;CODE&gt;index="myIndex" "executeExternalProcessPassword"&lt;/CODE&gt; returns 22k+ lines from just one day log span&lt;/P&gt;

&lt;P&gt;this works perfectly:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;perl -ne 'if (/executeExternalProcessPassword.*@(.+)$/) {print "$1\n"}' catalina.out
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Feb 2012 20:57:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-not-working-for-log4j/m-p/62461#M15420</guid>
      <dc:creator>pcorchary</dc:creator>
      <dc:date>2012-02-01T20:57:59Z</dc:date>
    </item>
    <item>
      <title>Re: rex not working for log4j</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-not-working-for-log4j/m-p/62462#M15421</link>
      <description>&lt;P&gt;The spacing appears different in the different regexes that you are showing. Maybe it's just the linebreaking or the font of your post, though. Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=myIndex | rex "executeExternalProcessPassword.*@(?&amp;lt;org&amp;gt;.+)$"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 01 Feb 2012 21:20:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-not-working-for-log4j/m-p/62462#M15421</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2012-02-01T21:20:26Z</dc:date>
    </item>
    <item>
      <title>Re: rex not working for log4j</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-not-working-for-log4j/m-p/62463#M15422</link>
      <description>&lt;P&gt;We were discussing this in &lt;CODE&gt;#splunk&lt;/CODE&gt; IRC, and the missing pipe character before &lt;CODE&gt;rex&lt;/CODE&gt; in the question/example turned out to be the real culprit.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2012 21:33:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-not-working-for-log4j/m-p/62463#M15422</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2012-02-01T21:33:12Z</dc:date>
    </item>
  </channel>
</rss>

