<?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: Problem with the simplest rex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53615#M13028</link>
    <description>&lt;P&gt;try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "(?&amp;lt;Error&amp;gt;[^\r\n\(]+)\("
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 05 Aug 2011 08:56:47 GMT</pubDate>
    <dc:creator>hjwang</dc:creator>
    <dc:date>2011-08-05T08:56:47Z</dc:date>
    <item>
      <title>Problem with the simplest rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53612#M13025</link>
      <description>&lt;P&gt;I have several error logs that have a similar format: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Cannot set Single Use Prices on Single Room Standard Room (
Cannot set Single Use Prices on Single Room Standard Suite (
Cannot set Single Use Prices on Single Room Executive King Room (
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The rex that I am attempting to use only returns a table of blank lines.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;"Cannot set Single Use Prices on Single Room " |rex "(?&amp;lt;Error&amp;gt;\w+?)\(" | table Error
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I've tried &lt;CODE&gt;\w \w+ \w+? \. \.+ \.+?&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Any suggestions?&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2011 20:49:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53612#M13025</guid>
      <dc:creator>rachelneal</dc:creator>
      <dc:date>2011-08-04T20:49:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the simplest rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53613#M13026</link>
      <description>&lt;P&gt;Is there a space between the last word and the "(".  If so, your regex isn't going to match.  Try:&lt;/P&gt;

&lt;P&gt;| rex "(?&lt;ERROR&gt;\w+)\s+("&lt;/ERROR&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2011 21:08:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53613#M13026</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2011-08-04T21:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the simplest rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53614#M13027</link>
      <description>&lt;P&gt;Also, &lt;CODE&gt;\w&lt;/CODE&gt; will not match spaces, so all you're going to get is the word "Room" or "Suite".&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2011 04:04:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53614#M13027</guid>
      <dc:creator>gkanapathy</dc:creator>
      <dc:date>2011-08-05T04:04:48Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the simplest rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53615#M13028</link>
      <description>&lt;P&gt;try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "(?&amp;lt;Error&amp;gt;[^\r\n\(]+)\("
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 05 Aug 2011 08:56:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53615#M13028</guid>
      <dc:creator>hjwang</dc:creator>
      <dc:date>2011-08-05T08:56:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the simplest rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53616#M13029</link>
      <description>&lt;P&gt;That's true.  It depends on what you are looking for.  rachelneal, if you would provided additional details in your question (use the "edit" link below you question), then a more suitable regex could be suggested. Specifically, note what strings you would like to extract from the samples given.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2011 15:27:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53616#M13029</guid>
      <dc:creator>Lowell</dc:creator>
      <dc:date>2011-08-05T15:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with the simplest rex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53617#M13030</link>
      <description>&lt;P&gt;Thanks everyone.  I ended up with rex "\"(?&lt;ERROR&gt;.+?(\d+?)).+?\'(?&lt;ROOMID&gt;\d+?)\'.+?\'(?&lt;RATEID&gt;\d+?)\'" after getting rex "\"(?&lt;ERROR&gt;.+?(" to work.  Woohoo!&lt;/ERROR&gt;&lt;/RATEID&gt;&lt;/ROOMID&gt;&lt;/ERROR&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2011 18:12:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Problem-with-the-simplest-rex/m-p/53617#M13030</guid>
      <dc:creator>rachelneal</dc:creator>
      <dc:date>2011-09-12T18:12:13Z</dc:date>
    </item>
  </channel>
</rss>

