<?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: Issue with regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372958#M109704</link>
    <description>&lt;P&gt;I mean when am sorting the results by date this is the table I get :&lt;/P&gt;

&lt;P&gt;Fri Oct 06 2017 13:00:00 GMT-0400 (EDT) &lt;BR /&gt;
Sat Oct 07 2017 12:00:00 GMT-0400 (EDT)&lt;BR /&gt;
Thu Oct 05 2017 06:00:00 GMT-0400 (EDT) &lt;BR /&gt;
Tue Oct 03 2017 13:00:00 GMT-0400 (EDT) &lt;BR /&gt;
Tue Oct 03 2017 18:00:00 GMT-0400 (EDT) &lt;BR /&gt;
Tue Oct 03 2017 18:00:00 GMT-0400 (EDT) &lt;BR /&gt;
Tue Oct 03 2017 19:00:00 GMT-0400 (EDT) &lt;BR /&gt;
Wed Oct 04 2017 13:00:00 GMT-0400 (EDT) &lt;BR /&gt;
Wed Oct 04 2017 13:00:00 GMT-0400 (EDT) &lt;BR /&gt;
Wed Oct 04 2017 19:30:00 GMT-0400 (EDT)&lt;/P&gt;

&lt;P&gt;and its based on the alphabetical order and not the actual dates &lt;/P&gt;</description>
    <pubDate>Tue, 03 Oct 2017 19:09:41 GMT</pubDate>
    <dc:creator>bharpur183</dc:creator>
    <dc:date>2017-10-03T19:09:41Z</dc:date>
    <item>
      <title>Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372927#M109673</link>
      <description>&lt;P&gt;This is the event :&lt;/P&gt;

&lt;P&gt;02OCT2017_16:46:47.212 130880:140149567481600 INFO event.py:177 root event = {"hopTrace": {"hops": [{"machine": {"nodeId": 569}, "application": {"processId": 19295, "processName": "udrqssvc.tsk", "appName": "DRQS"}, "authenticatedUser": {"uuid": 10095155}}]}, "event": {"eventType": "DRQS UPDATED", "drqsNumber": &lt;STRONG&gt;107516809(FIELD5)&lt;/STRONG&gt;, "newHeader": {"status": "Q", "function": "N539", "billToId": 5028, "yellowKey": "", "billToType": "HIER", "lastUpdateTime": "2017-10-02T20:46:47.000+00:00", "type": "IW", "creatorUuid": 1603009, "slaCategory": -1, "summary": "MM/DD    n539 hardware failure        IBM PMR: 24465.L6Q.000", "queue": "", "timeClosed": "1899-12-31T05:00:00.000+00:00", "ouTypeCode": 0, "routeToGroup": &lt;STRONG&gt;270(FIELD4)&lt;/STRONG&gt;, "ouTypeDescription": "", "tsCustomerNumber": 0, "closedUuid": 0, "lastUpdateUuid": 10095155, "createTime": "2017-09-29T12:00:48.000+00:00", "ownerUuid": 2984495}, "logNotes": [{"logNoteId": "1049598095", "timestamp": "2017-10-02T20:46:47.141+00:00", "authorUuid": 10095155, "logText": [{"text": "Note added from offline, remote machine 208\n", "textType": "DEEMPHASIZED"}, {"text": "{FIFW PRQS &lt;STRONG&gt;160269881(FIELD6)&lt;/STRONG&gt;} submitted to take &lt;STRONG&gt;N539(FIELD1)&lt;/STRONG&gt; (N539) offline on &lt;STRONG&gt;Tue Oct 03 2017 19:00:00 GMT-0400 (EDT)(FIELD2)&lt;/STRONG&gt; for &lt;STRONG&gt;HARDWARE REPAIRS(FIELD3)&lt;/STRONG&gt;\n", "textType": "NORMAL"}], "isAutomated": true}]}, "metadata": {"publishId": "121785005", "publishTime": "2017-10-02T16:46:47.189-04:00"}}&lt;/P&gt;

&lt;P&gt;From the above event I want to create a statistics table with Field1-Fileds 6&lt;BR /&gt;
I have highlighted the needed fields as bold . I get some of them but not all 6 fields&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 22:48:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372927#M109673</guid>
      <dc:creator>bharpur183</dc:creator>
      <dc:date>2017-10-02T22:48:47Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372928#M109674</link>
      <description>&lt;P&gt;&lt;CODE&gt;| rex field=_raw "(?&amp;lt;field6&amp;gt;\S+) submitted to take (?&amp;lt;field1&amp;gt;\S+) .* offline on (?&amp;lt;field2&amp;gt;.*) for (?&amp;lt;field3&amp;gt;[^\"]+)\""&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| rex field=_raw "\"drqsNumber\": (?&amp;lt;field5&amp;gt;\S+),"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| rex field=_raw "\"routeToGroup\": (?&amp;lt;field4&amp;gt;\S+),"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 00:22:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372928#M109674</guid>
      <dc:creator>sduff_splunk</dc:creator>
      <dc:date>2017-10-03T00:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372929#M109675</link>
      <description>&lt;P&gt;get an error :&lt;/P&gt;

&lt;P&gt;Error in 'rex' command: Encountered the following error while compiling the regex '(?.*) for (?[^"]+)"': Regex: syntax error in subpattern name (missing terminator)&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 00:34:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372929#M109675</guid>
      <dc:creator>bharpur183</dc:creator>
      <dc:date>2017-10-03T00:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372930#M109676</link>
      <description>&lt;P&gt;I've updated the query&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 00:37:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372930#M109676</guid>
      <dc:creator>sduff_splunk</dc:creator>
      <dc:date>2017-10-03T00:37:45Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372931#M109677</link>
      <description>&lt;P&gt;Please check this rex query... (if the event got different words, then rex needs to be adjusted)&lt;BR /&gt;
Updated - the base query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;contextName=olliebot service_name=olliebot source="/bb/logs/vcon/olliebot.log.2017*" AND (PRQS AND submitted)
    | rex field=_raw ".*\"drqsNumber\"\:\s(?&amp;lt;Field5&amp;gt;\d+)\(FIELD5\).*\"routeToGroup\"\:\s(?&amp;lt;Field4&amp;gt;\d+)\(FIELD4\).*PRQS\s(?&amp;lt;Field6&amp;gt;\d+)\(FIELD6\).*take\s(?&amp;lt;Field1&amp;gt;\S+)\(FIELD1\).*offline\son\s(?&amp;lt;Field2&amp;gt;.*)\(FIELD2\)\sfor\s(?&amp;lt;Field3&amp;gt;.*)\(FIELD3\)"
    | table Field5 Field4 Field3 Field6 Field1 Field2 Field3 _raw
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3598i5B08BD59B38F46A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 00:39:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372931#M109677</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-10-03T00:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372932#M109678</link>
      <description>&lt;P&gt;keep getting an error :&lt;/P&gt;

&lt;P&gt;Unknown search command 'sourcetype'.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 00:46:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372932#M109678</guid>
      <dc:creator>bharpur183</dc:creator>
      <dc:date>2017-10-03T00:46:25Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372933#M109679</link>
      <description>&lt;P&gt;i uploaded the sample event on my splunk with the sourcetype as rexField. &lt;BR /&gt;
for your environment, you have to write the base splunk query which will get the right events. &lt;/P&gt;

&lt;P&gt;similar to this  - &lt;BR /&gt;
index=main source=fieldlogs sourcetype=logs host=hostname | remaining rex query&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 00:55:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372933#M109679</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-10-03T00:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372934#M109680</link>
      <description>&lt;P&gt;Thanks . That works . can you please provide the same for fields 1 and field 5 ?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 00:55:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372934#M109680</guid>
      <dc:creator>bharpur183</dc:creator>
      <dc:date>2017-10-03T00:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372935#M109681</link>
      <description>&lt;P&gt;yep. I have my regular query before the above rex you provided , but still gives me the unknown source type error &lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 01:03:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372935#M109681</guid>
      <dc:creator>bharpur183</dc:creator>
      <dc:date>2017-10-03T01:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372936#M109682</link>
      <description>&lt;P&gt;may i know your splunk search query please, when you run it, do you get the events similar to the one updated on the question&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 01:06:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372936#M109682</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-10-03T01:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372937#M109683</link>
      <description>&lt;P&gt;Updated. Please look at the rex command to learn how this command works.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rex"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rex&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Search/SPLandregularexpressions"&gt;http://docs.splunk.com/Documentation/Splunk/latest/Search/SPLandregularexpressions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 01:09:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372937#M109683</guid>
      <dc:creator>sduff_splunk</dc:creator>
      <dc:date>2017-10-03T01:09:03Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372938#M109684</link>
      <description>&lt;P&gt;this is my query&lt;/P&gt;

&lt;P&gt;contextName=olliebot service_name=olliebot source="/bb/logs/vcon/olliebot.log.2017*" AND (PRQS AND submitted) &lt;/P&gt;

&lt;P&gt;and yes the question above is the result of the above query &lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 01:16:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372938#M109684</guid>
      <dc:creator>bharpur183</dc:creator>
      <dc:date>2017-10-03T01:16:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372939#M109685</link>
      <description>&lt;P&gt;Please try this query and update me what happens - &lt;BR /&gt;
&lt;CODE&gt;contextName=olliebot service_name=olliebot source="/bb/logs/vcon/olliebot.log.2017*" AND (PRQS AND submitted) | rex field=_raw ".*\"drqsNumber\"\:\s(?\d+)\(FIELD5\).*\"routeToGroup\"\:\s(?\d+)\(FIELD4\).*PRQS\s(?\d+)\(FIELD6\).*take\s(?\S+)\(FIELD1\).*offline\son\s(?.*)\(FIELD2\)\sfor\s(?.*)\(FIELD3\)"&lt;BR /&gt;
 | table Field5 Field4 Field3 Field6 Field1 Field2 Field3 _raw&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 01:17:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372939#M109685</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-10-03T01:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372940#M109686</link>
      <description>&lt;P&gt;got this error now :&lt;/P&gt;

&lt;P&gt;Error in 'rex' command: Encountered the following error while compiling the regex '.&lt;EM&gt;"drqsNumber":\s(?\d+)(FIELD5).&lt;/EM&gt;"routeToGroup":\s(?\d+)(FIELD4).&lt;EM&gt;PRQS\s(?\d+)(FIELD6).*take\s(?\S+)(FIELD1).*offline\son\s(?.&lt;/EM&gt;)(FIELD2)\sfor\s(?.*)(FIELD3)': Regex: unrecognized character after (? or (?-&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:04:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372940#M109686</guid>
      <dc:creator>bharpur183</dc:creator>
      <dc:date>2020-09-29T16:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372941#M109687</link>
      <description>&lt;P&gt;i have updated the Splunk Query on this answer post.. can you please try it and update me - &lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 01:30:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372941#M109687</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-10-03T01:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372942#M109688</link>
      <description>&lt;P&gt;same error :&lt;/P&gt;

&lt;P&gt;Error in 'rex' command: Encountered the following error while compiling the regex '.&lt;EM&gt;"drqsNumber":\s(?\d+)(FIELD5).&lt;/EM&gt;"routeToGroup":\s(?\d+)(FIELD4).&lt;EM&gt;PRQS\s(?\d+)(FIELD6).*take\s(?\S+)(FIELD1).*offline\son\s(?.&lt;/EM&gt;)(FIELD2)\sfor\s(?.*)(FIELD3)': Regex: unrecognized character after (? or (?-&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 16:04:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372942#M109688</guid>
      <dc:creator>bharpur183</dc:creator>
      <dc:date>2020-09-29T16:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372943#M109689</link>
      <description>&lt;P&gt;ok, lets do step by step.. when you run this, do you get the Field5 results?&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;contextName=olliebot service_name=olliebot source="/bb/logs/vcon/olliebot.log.2017*" AND (PRQS AND submitted)&lt;BR /&gt;
     | rex field=_raw ".*\"drqsNumber\"\:\s(?&amp;lt;Field5&amp;gt;\d+) | table _raw Field5&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 01:36:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372943#M109689</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-10-03T01:36:56Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372944#M109690</link>
      <description>&lt;P&gt;the above query is going on for the last 20 mins and its still going and producing no results &lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 01:59:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372944#M109690</guid>
      <dc:creator>bharpur183</dc:creator>
      <dc:date>2017-10-03T01:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372945#M109691</link>
      <description>&lt;P&gt;when you run this, how many events you get - &lt;BR /&gt;
&lt;CODE&gt;contextName=olliebot service_name=olliebot source="/bb/logs/vcon/olliebot.log.2017*" AND (PRQS AND submitted)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 02:03:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372945#M109691</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-10-03T02:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372946#M109692</link>
      <description>&lt;P&gt;ok the query finished and did yield field 5 correctly ( there are empty rows in between the results in the statistics table) but it did yield field 5&lt;/P&gt;</description>
      <pubDate>Tue, 03 Oct 2017 02:07:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-regex/m-p/372946#M109692</guid>
      <dc:creator>bharpur183</dc:creator>
      <dc:date>2017-10-03T02:07:26Z</dc:date>
    </item>
  </channel>
</rss>

