<?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 to capture with rex an event in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53358#M12981</link>
    <description>&lt;P&gt;i got this error on splunk when I tryed to use the referenced command:&lt;/P&gt;

&lt;P&gt;Error in 'rex' command: Encountered the following error while compiling the regex '(?&amp;lt;=[\d+-\d+-\d+\s\d+:\d+:\d+,\d+][\w+].*[\S+]\s)(\w+())': Regex: lookbehind assertion is not fixed length&lt;/P&gt;

&lt;P&gt;what is it supposed to be ?&lt;/P&gt;</description>
    <pubDate>Mon, 20 Sep 2010 21:19:36 GMT</pubDate>
    <dc:creator>Caio_Santos</dc:creator>
    <dc:date>2010-09-20T21:19:36Z</dc:date>
    <item>
      <title>help to capture with rex an event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53353#M12976</link>
      <description>&lt;P&gt;hello everybody,
following is the event that i'm trying to capture with rex.&lt;/P&gt;

&lt;P&gt;[2010-08-05 17:51:11,661][info] INFO  com.porto.infra.security.SecurityUtil [5c815c81] &lt;STRONG&gt;getUsuario()&lt;/STRONG&gt; - Foi chamado, mas Authentication.Principal = NULL -&amp;gt; Exception throwed&lt;BR /&gt;
[2010-08-05 17:51:11,662][info] INFO  com.porto.infra.security.portal.PortalUtil [5c815c81] &lt;STRONG&gt;PreAuthenticatedRequestInfo()&lt;/STRONG&gt; - Usuario nao existe - SecurityUtil.getUsuario() retornou Exception getUsuario() - Usuário precisa estar autenticado para chamar esta função &lt;/P&gt;

&lt;P&gt;I'm using this regex&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\b\]\s\w+(\(\))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;i'm trying to capture just the one in bold without the &lt;EM&gt;'] '&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;HR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;The error that I'm getting on splunk when I attempt to use that rex command:&lt;/P&gt;

&lt;P&gt;Error in 'rex' command: Encountered the following error while compiling the regex '(?&amp;lt;=[[\w\d]+]\s)(\w+()))': Regex: lookbehind assertion is not fixed length&lt;/P&gt;</description>
      <pubDate>Sat, 18 Sep 2010 02:41:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53353#M12976</guid>
      <dc:creator>Caio_Santos</dc:creator>
      <dc:date>2010-09-18T02:41:35Z</dc:date>
    </item>
    <item>
      <title>Re: help to capture with rex an event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53354#M12977</link>
      <description>&lt;P&gt;This regex will work:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(?&amp;lt;=\[\d+-\d+-\d+\s\d+:\d+:\d+,\d+\]\[\w+\].*\[\S+\]\s)(\w+\(\))
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;[Edit: rex usage]
To use this in rex you can simply change the lookbehind to a non-capturing group and give a field name (in this case "function") to your capturing group:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;search terms | rex "(?:\[\d+-\d+-\d+\s\d+:\d+:\d+,\d+\]\[\w+\].*\[\S+\]\s)(?&amp;lt;function&amp;gt;\w+\(\))"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 18 Sep 2010 03:20:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53354#M12977</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-09-18T03:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: help to capture with rex an event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53355#M12978</link>
      <description>&lt;P&gt;i got what you did, but i'm not sure if i need to setup something else like making the lookaround flag on. Because even in my regex tester this is not working.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2010 19:51:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53355#M12978</guid>
      <dc:creator>Caio_Santos</dc:creator>
      <dc:date>2010-09-20T19:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: help to capture with rex an event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53356#M12979</link>
      <description>&lt;P&gt;tested fine for me. Tried it in Expresso, &lt;A href="http://regexlib.com/RETester.aspx"&gt;http://regexlib.com/RETester.aspx&lt;/A&gt;, and &lt;A href="http://gskinner.com/RegExr/"&gt;http://gskinner.com/RegExr/&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2010 20:37:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53356#M12979</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-09-20T20:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: help to capture with rex an event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53357#M12980</link>
      <description>&lt;P&gt;Lookarounds will work in splunk's props.conf for field extractions.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2010 20:38:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53357#M12980</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-09-20T20:38:39Z</dc:date>
    </item>
    <item>
      <title>Re: help to capture with rex an event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53358#M12981</link>
      <description>&lt;P&gt;i got this error on splunk when I tryed to use the referenced command:&lt;/P&gt;

&lt;P&gt;Error in 'rex' command: Encountered the following error while compiling the regex '(?&amp;lt;=[\d+-\d+-\d+\s\d+:\d+:\d+,\d+][\w+].*[\S+]\s)(\w+())': Regex: lookbehind assertion is not fixed length&lt;/P&gt;

&lt;P&gt;what is it supposed to be ?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2010 21:19:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53358#M12981</guid>
      <dc:creator>Caio_Santos</dc:creator>
      <dc:date>2010-09-20T21:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: help to capture with rex an event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53359#M12982</link>
      <description>&lt;P&gt;I updated the answer.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2010 22:15:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53359#M12982</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-09-20T22:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: help to capture with rex an event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53360#M12983</link>
      <description>&lt;P&gt;see updated answer RE: rex usage&lt;/P&gt;</description>
      <pubDate>Mon, 20 Sep 2010 22:21:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53360#M12983</guid>
      <dc:creator>ftk</dc:creator>
      <dc:date>2010-09-20T22:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: help to capture with rex an event</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53361#M12984</link>
      <description>&lt;P&gt;In the future you can try using the 'erex' command, which will take examples you give it as in&lt;/P&gt;

&lt;P&gt;... | erex monthday examples="7/01, 07/02" counterexamples="99/2"&lt;/P&gt;

&lt;P&gt;It will give you a regex that will work to pull out your examples.  &lt;/P&gt;</description>
      <pubDate>Tue, 21 Sep 2010 02:17:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-to-capture-with-rex-an-event/m-p/53361#M12984</guid>
      <dc:creator>thepocketwade</dc:creator>
      <dc:date>2010-09-21T02:17:26Z</dc:date>
    </item>
  </channel>
</rss>

