<?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 with regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169265#M48364</link>
    <description>&lt;P&gt;Correct. So my delims would be both space and " ". And the number of fields is always same.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Feb 2014 21:12:16 GMT</pubDate>
    <dc:creator>pdash</dc:creator>
    <dc:date>2014-02-27T21:12:16Z</dc:date>
    <item>
      <title>Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169260#M48359</link>
      <description>&lt;P&gt;I have a log format that uses space as delim and "" as delim when we have space in between. How should i write the rex to split these fields out?&lt;/P&gt;

&lt;P&gt;02-27-2014/04:30:21-0700 11.23.13.41 64.13.30.50 96.42.90.80 HTTP/1.1 GET abc.defghi.com /cs/aabd/ajax/ajax.wp 200 25575 642 35633 "?lcid=2401&amp;amp;mobile=false" "-" "TI.SI=0; TI=0; VARS=LCID=2401; VARSESSION=S=hjdhjehJJK%FJD44i2fjd%3d%3d&amp;amp;SLI=0&amp;amp;FIRSTSESSION=1&amp;amp;ITT=0; ANCUUID=849nfdjgfvjsdfdjh73e4jfj; GGG=0; GHJMK=0" "-"&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 20:08:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169260#M48359</guid>
      <dc:creator>pdash</dc:creator>
      <dc:date>2014-02-27T20:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169261#M48360</link>
      <description>&lt;P&gt;What version of splunk are you using?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 20:51:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169261#M48360</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2014-02-27T20:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169262#M48361</link>
      <description>&lt;P&gt;splunk 5.0&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 20:52:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169262#M48361</guid>
      <dc:creator>pdash</dc:creator>
      <dc:date>2014-02-27T20:52:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169263#M48362</link>
      <description>&lt;P&gt;If I understand correctly, you want the following:&lt;BR /&gt;
field1="?lcid=2401&amp;amp;mobile=false"&lt;BR /&gt;
field2="-"&lt;BR /&gt;
field3="TI.SI=0; TI=0; VARS=LCID=2401; VARSESSION=S=hjdhjehJJK%FJD44i2fjd%3d%3d&amp;amp;SLI=0&amp;amp;FIRSTSESSION=1&amp;amp;ITT=0; ANCUUID=849nfdjgfvjsdfdjh73e4jfj; GGG=0; GHJMK=0"&lt;BR /&gt;
field4="-"&lt;/P&gt;

&lt;P&gt;Is this correct?&lt;BR /&gt;
If the number of fields (extractions) is always the same, you could define a regex as follows:&lt;/P&gt;

&lt;P&gt;"(?P&lt;FIELD1&gt;[^"]*)"\s"(?P&lt;FIELD2&gt;[^"]*)"\s"(?P&lt;FIELD3&gt;[^"]*)"\s"(?P&lt;FIELD4&gt;[^"]*)"&lt;/FIELD4&gt;&lt;/FIELD3&gt;&lt;/FIELD2&gt;&lt;/FIELD1&gt;&lt;/P&gt;

&lt;P&gt;If the number of fields is not fixed, then the above won't work&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 21:08:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169263#M48362</guid>
      <dc:creator>aholzer</dc:creator>
      <dc:date>2014-02-27T21:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169264#M48363</link>
      <description>&lt;P&gt;Are these the fields you're trying to extract?&lt;BR /&gt;
02-27-2014/04:30:21-0700&lt;BR /&gt;
 11.23.13.41&lt;BR /&gt;
 64.13.30.50&lt;BR /&gt;
 96.42.90.80&lt;BR /&gt;
 HTTP/1.1&lt;BR /&gt;
 GET&lt;BR /&gt;
 abc.defghi.com&lt;BR /&gt;
 /cs/aabd/ajax/ajax.wp&lt;BR /&gt;
 200&lt;BR /&gt;
 25575&lt;BR /&gt;
 642&lt;BR /&gt;
 35633&lt;BR /&gt;
 "?lcid=2401&amp;amp;mobile=false"&lt;BR /&gt;
 "-"&lt;BR /&gt;
 "TI.SI=0; TI=0; VARS=LCID=2401; VARSESSION=S=hjdhjehJJK%FJD44i2fjd%3d%3d&amp;amp;SLI=0&amp;amp;FIRSTSESSION=1&amp;amp;ITT=0; ANCUUID=849nfdjgfvjsdfdjh73e4jfj; GGG=0; GHJMK=0"&lt;BR /&gt;
 "-"&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 21:10:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169264#M48363</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2014-02-27T21:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169265#M48364</link>
      <description>&lt;P&gt;Correct. So my delims would be both space and " ". And the number of fields is always same.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 21:12:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169265#M48364</guid>
      <dc:creator>pdash</dc:creator>
      <dc:date>2014-02-27T21:12:16Z</dc:date>
    </item>
    <item>
      <title>Re: Help with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169266#M48365</link>
      <description>&lt;P&gt;I would use this, but not in a search string with rex.  You should use EXTRACT in props.conf with other parameters for the sourcetype.&lt;/P&gt;

&lt;P&gt;[yoursourcetype]&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;EXTRACT-multifieldx = ^(?&amp;lt;datetimetz&amp;gt;\d+-\d+-\d+/\d+:\d+:\d+-\d+)\s(?&amp;lt;IP1&amp;gt;\d+\.\d+\.\d+\.\d+)\s(?&amp;lt;IP2&amp;gt;\d+\.\d+\.\d+\.\d+)\s(?&amp;lt;IP3&amp;gt;\d+\.\d+\.\d+\.\d+)\s(?&amp;lt;protocol&amp;gt;.*)\s(?&amp;lt;method&amp;gt;\w+)\s(?&amp;lt;site&amp;gt;.*)\s(?&amp;lt;path&amp;gt;.*)\s(?&amp;lt;metric1&amp;gt;\d+)\s\s(?&amp;lt;metric2&amp;gt;\d+)\s(?&amp;lt;metric3&amp;gt;\d+)\s(?&amp;lt;metric4&amp;gt;\d+)\s"(?&amp;lt;string1&amp;gt;[^"]+)"\s"(?&amp;lt;string2&amp;gt;[^"]+)"\s"(?&amp;lt;string3&amp;gt;[^"]+)"\s"(?&amp;lt;string4&amp;gt;[^"]+)"\s&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2014 21:40:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-regex/m-p/169266#M48365</guid>
      <dc:creator>lukejadamec</dc:creator>
      <dc:date>2014-02-27T21:40:38Z</dc:date>
    </item>
  </channel>
</rss>

