<?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 me in writing Regex for the below data in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464854#M191636</link>
    <description>&lt;P&gt;Then we need more detail please. You have 2 responses with confirmed working results. Is your event in a field, or is it _raw?&lt;/P&gt;</description>
    <pubDate>Tue, 27 Aug 2019 18:45:47 GMT</pubDate>
    <dc:creator>jpolvino</dc:creator>
    <dc:date>2019-08-27T18:45:47Z</dc:date>
    <item>
      <title>help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464847#M191629</link>
      <description>&lt;P&gt;&amp;lt;37&amp;gt;Aug 27 10:52:59 DC1TPSMS02 CEF:0|TippingPoint|UnityOne|1.0.0.17|7611|Suspicious Country Blacklist|1|app=IP cnt=1 dst=192.54.112.30 dpt=53 act=Block cn1=0 cn1Label=VLAN ID cn2=33554431 cn2Label=Taxonomy cn3=0 &lt;/P&gt;

&lt;P&gt;from above data i want to extract  below line&lt;/P&gt;

&lt;P&gt;Aug 27 10:52:59 DC1TPSMS02 CEF:0|TippingPoint&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 18:09:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464847#M191629</guid>
      <dc:creator>vikram1583</dc:creator>
      <dc:date>2019-08-27T18:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464848#M191630</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;|  rex field=_raw "(?&amp;lt;author&amp;gt;.*)\|+UnityOne"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    | makeresults 
    |  eval x="Aug 27 10:52:59 DC1TPSMS02 CEF:0|TippingPoint|UnityOne|1.0.0.17|7611|Suspicious Country Blacklist|1|app=IP cnt=1 dst=192.54.112.30 dpt=53 act=Block cn1=0 cn1Label=VLAN ID cn2=33554431 cn2Label=Taxonomy cn3=0" 
    |  rex field=x "(?&amp;lt;author&amp;gt;.*)\|+UnityOne"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Aug 2019 18:22:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464848#M191630</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-08-27T18:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464849#M191631</link>
      <description>&lt;P&gt;Assuming it is always in the same position, this may work for you:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search)
| rex "(?&amp;lt;extract&amp;gt;.*)(\|.*?){6}"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;(your search)
| rex "(?&amp;lt;extract&amp;gt;(([^|]+)\|)\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Aug 2019 18:24:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464849#M191631</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2019-08-27T18:24:45Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464850#M191632</link>
      <description>&lt;P&gt;not working&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 18:32:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464850#M191632</guid>
      <dc:creator>vikram1583</dc:creator>
      <dc:date>2019-08-27T18:32:10Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464851#M191633</link>
      <description>&lt;P&gt;Not working&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 18:34:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464851#M191633</guid>
      <dc:creator>vikram1583</dc:creator>
      <dc:date>2019-08-27T18:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464852#M191634</link>
      <description>&lt;P&gt;Odd, they work for me. Is the event you posted accurate, even the pipe characters? Borrowing SPL from Sukisen1981:&lt;/P&gt;

&lt;P&gt;| makeresults&lt;BR /&gt;
|  eval x="Aug 27 10:52:59 DC1TPSMS02 CEF:0|TippingPoint|UnityOne|1.0.0.17|7611|Suspicious Country Blacklist|1|app=IP cnt=1 dst=192.54.112.30 dpt=53 act=Block cn1=0 cn1Label=VLAN ID cn2=33554431 cn2Label=Taxonomy cn3=0" &lt;BR /&gt;
|  rex field=x "(?.&lt;EM&gt;)(|.&lt;/EM&gt;?){6}"&lt;BR /&gt;
| table extract&lt;/P&gt;

&lt;P&gt;Produces:&lt;BR /&gt;
Aug 27 10:52:59 DC1TPSMS02 CEF:0|TippingPoint&lt;/P&gt;

&lt;P&gt;So does the other example. I'm curious what you get!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 18:41:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464852#M191634</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2019-08-27T18:41:11Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464853#M191635</link>
      <description>&lt;P&gt;This is also not working &lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 18:42:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464853#M191635</guid>
      <dc:creator>vikram1583</dc:creator>
      <dc:date>2019-08-27T18:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464854#M191636</link>
      <description>&lt;P&gt;Then we need more detail please. You have 2 responses with confirmed working results. Is your event in a field, or is it _raw?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 18:45:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464854#M191636</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2019-08-27T18:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464855#M191637</link>
      <description>&lt;P&gt;&amp;lt;37&amp;gt;Aug 27 11:57:42 DC1TPSMS02 CEF:0|TippingPoint|UnityOne|1.0.0.17|7610|Blacklist|1|app=IP cnt=1 dst=208.87.176.250 dpt=389 act=Block cn1=613 cn1Label=VLAN ID cn2=33554431 cn2Label=Taxonomy cn3=0 cn3Label=Packet Trace cs1=CDE Perimeter Outbound cs1Label=Profile Name cs2=b005e16a-02dd-493c-a525-ba7c10c3e66c cs2Label=Policy UUID cs3=00000001-0001-0001-0001-000000007610 cs3Label=Signature UUID cs4=1 cs4Label=DeviceSegment cs5= cs5Label=SMS Name dvchost=DC1-IPS-04 cs6=185.94.111.1 cs6Label=Filter Message Parms srcip=185.94.111.1 spt=45138 externalId=115756483 rt=1566932262858 cat=Reputation proto=IP deviceInboundInterface=26 c6a2= c6a2Label=Source IPv6 c6a3= c6a3Label=Destination IPv6 request= requestMethod= dhost= sourceTranslatedAddress=185.94.111.1 c6a1= c6a1Label=Client IPv6 suser= sntdom= duser= dntdom=&lt;BR /&gt;
host =  10.114.5.250 source =   tcp:514 sourcetype =    cisco:esa:legacy&lt;/P&gt;

&lt;P&gt;This is the actual event&lt;/P&gt;

&lt;P&gt;My search: index=email earliest=-10m (host=10.114.5.* OR host=10.124.5.*) NOT default tippingpoint | rex "(?(([^|]+)|)\w+)"  &lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 19:03:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464855#M191637</guid>
      <dc:creator>vikram1583</dc:creator>
      <dc:date>2019-08-27T19:03:40Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464856#M191638</link>
      <description>&lt;P&gt;Try putting this in your rex double quotes:&lt;BR /&gt;
(?.&lt;EM&gt;)(|.&lt;/EM&gt;?){6}&lt;/P&gt;

&lt;P&gt;Do you get a Splunk error?&lt;/P&gt;

&lt;P&gt;Try formatting your search like this:&lt;BR /&gt;
index=email (host=10.114.5. OR host=10.124.5.) NOT default tippingpoint earliest=-10m | rex "(?.&lt;EM&gt;)(|.&lt;/EM&gt;?){6}"&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 19:10:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464856#M191638</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2019-08-27T19:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464857#M191639</link>
      <description>&lt;P&gt;&amp;lt;37&amp;gt;Aug 27 12:04:17 DC1TPSMS02 CEF:0|TippingPoint|UnityOne|1.0.0.17|7610|Blacklist|1|app=IP cnt=1 dst=208.87.176.47 dpt=8089 act=Block cn1=613 cn1Label=VLAN ID cn2=33554431 cn2Label=Taxonomy cn3=0 cn3Label=Packet Trace cs1=CDE Perimeter Outbound cs1Label=Profile Name cs2=b005e16a-02dd-493c-a525-ba7c10c3e66c cs2Label=Policy UUID cs3=00000001-0001-0001-0001-000000007610 cs3Label=Signature UUID cs4=1 cs4Label=DeviceSegment cs5= cs5Label=SMS Name dvchost=DC1-IPS-04 cs6=185.216.140.16 cs6Label=Filter Message Parms srcip=185.216.140.16 spt=52075 externalId=115757480 rt=1566932657158 cat=Reputation proto=IP deviceInboundInterface=26 c6a2= c6a2Label=Source IPv6 c6a3= c6a3Label=Destination IPv6 request= requestMethod= dhost= sourceTranslatedAddress=185.216.140.16 c6a1= c6a1Label=Client IPv6 suser= sntdom= duser= dntdom=&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 19:10:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464857#M191639</guid>
      <dc:creator>vikram1583</dc:creator>
      <dc:date>2019-08-27T19:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464858#M191640</link>
      <description>&lt;P&gt;index=email (host=10.114.5. OR host=10.124.5.) NOT default tippingpoint earliest=-10m | rex "(?.)(|.?){6}"&lt;/P&gt;

&lt;P&gt;I am getting this error&lt;/P&gt;

&lt;P&gt;Error in 'rex' command: Encountered the following error while compiling the regex '(?.)(|.?){6}': Regex: unrecognized character after (? or (?-.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 19:13:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464858#M191640</guid>
      <dc:creator>vikram1583</dc:creator>
      <dc:date>2019-08-27T19:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464859#M191641</link>
      <description>&lt;P&gt;hi @vikram1583 &lt;BR /&gt;
both solutions given by me and @jpolvino  work&lt;BR /&gt;
have you tried the makeresults one, use it as it is?  can you paste the screen shot of your output?&lt;BR /&gt;
there is no way  the makeresults won't work - I have hardcoded the text, please run the code and give us the snapshot of the statistics tab output&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 19:44:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464859#M191641</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-08-27T19:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464860#M191642</link>
      <description>&lt;P&gt;@jpolvino your rex is getting corrupted while pasting as a comment, it works for the answer you gave though, I think vikram has copied rex from your comments as it is and is getting rex errors&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 19:49:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464860#M191642</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-08-27T19:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464861#M191643</link>
      <description>&lt;P&gt;Yes, I see corrupted values. @vikram1583 please type a solution in manually.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 19:57:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464861#M191643</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2019-08-27T19:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464862#M191644</link>
      <description>&lt;P&gt;hi  @vikram1583 &lt;BR /&gt;
your initial query is index=email (host=10.114.5. OR host=10.124.5.) NOT default tippingpoint | rex whatever...&lt;BR /&gt;
Remove the rex and first see whether you are receiving the event on which you want to apply rex. 2 possible issue - the earliest time range is excluding those events and I am also not ok with the NOT condition, if you mean to exclude default tippongpoint use it like this&lt;BR /&gt;
index=email (host=10.114.5. OR host=10.124.5.) NOT ("default tippingpoint")&lt;BR /&gt;
You might get nothing returned but you will not get a splunk syntax error on using the rexes, so when you say not working - what is not wokring?&lt;/P&gt;

&lt;P&gt;@jpolvino - I think we need to ensure first that the source event is properly captured, rex is working but failing because of that. It is very late at night here, i will look into this again tomorrow in case this is still an issue &lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 20:10:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464862#M191644</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-08-27T20:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464863#M191645</link>
      <description>&lt;P&gt;@jpolvino | rex "(?.&lt;EM&gt;)(|.&lt;/EM&gt;?){6}"  while i am using this rex i am not getting any error, it is not changing anything in the event it remains the same &lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 21:23:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464863#M191645</guid>
      <dc:creator>vikram1583</dc:creator>
      <dc:date>2019-08-27T21:23:04Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464864#M191646</link>
      <description>&lt;P&gt;@Sukisen1981 same thing with your rex i am not getting any error but results did not change same event is coming&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2019 21:24:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464864#M191646</guid>
      <dc:creator>vikram1583</dc:creator>
      <dc:date>2019-08-27T21:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464865#M191647</link>
      <description>&lt;P&gt;|  rex field=x "(?.*)|+UnityOne"  This Rex is working &lt;/P&gt;

&lt;P&gt;i want to validate it before coming to the indexer want to write props for this can you please send me props Please&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 04:55:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464865#M191647</guid>
      <dc:creator>vikram1583</dc:creator>
      <dc:date>2019-08-28T04:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: help me in writing Regex for the below data</title>
      <link>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464866#M191648</link>
      <description>&lt;P&gt;hi @vikram1583 &lt;BR /&gt;
Please see below screen shot from my and @jpolvino 's rexes, see the author field in first query and extract field in the second query.&lt;BR /&gt;
Where are you checking for the these fields after you run your rex?Please hardcode first n confirm that the author or extract filed output is what you need&lt;/P&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/7586i7A2CF1ED41913FF4/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>Wed, 28 Aug 2019 07:00:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/help-me-in-writing-Regex-for-the-below-data/m-p/464866#M191648</guid>
      <dc:creator>Sukisen1981</dc:creator>
      <dc:date>2019-08-28T07:00:43Z</dc:date>
    </item>
  </channel>
</rss>

