<?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: Will someone help me with my Regular Expression query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439534#M125038</link>
    <description>&lt;P&gt;Thank you. After some minor modification that worked smoothly. Many thanks for the help. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Sep 2018 12:31:16 GMT</pubDate>
    <dc:creator>Shashank_87</dc:creator>
    <dc:date>2018-09-05T12:31:16Z</dc:date>
    <item>
      <title>Will someone help me with my Regular Expression query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439527#M125031</link>
      <description>&lt;P&gt;Hi, I am looking for some help regarding Splunk Regular Expression. I have a data something like this in a field "field1" -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\P1 S+ box  5.00 Dol\BUNDLE_1   0.00 Dol\   P2  Not applicable  15.00 Dol\  DISCOUNT\   D1  -12.50 Dol\T1_EXISTING  0.00 Dol\   T2_EXISTING\    D2 Fibre 41.75 Dol\ T3_EXISTING\    P3  Mix 26.66 Dol\  T4_EXISTING\    P4 Weekends 0.00 Dol\P5 Vgg box 5.00 Dol\DISC*  -15.81 Dol  \P6*    -5.00 Dol   \P7* Phone line 19.00 Dol   \P8*    C&amp;amp;C 0.00 Dol    \TI_PENT*   0.00 Dol    \P9*    -11.00 Dol  \P10* Bundle2   -18.60 Dol  \P11*   Extra Fee   0.00 Dol.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;If you observe, there is a product "P1", it's description "S+ box" and Price "5.00 Dol" and like these there are multiple separated by "\".&lt;/P&gt;

&lt;P&gt;I want to extract these products with their prices so that I can see each product and their associated &lt;BR /&gt;
prices. &lt;BR /&gt;
Basically, I am looking for if any product has got NULL price.&lt;/P&gt;

&lt;P&gt;Let me know if someone can help.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 11:48:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439527#M125031</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2018-09-04T11:48:22Z</dc:date>
    </item>
    <item>
      <title>Re: Will someone help me with my Regular Expression query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439528#M125032</link>
      <description>&lt;P&gt;So, in your example, which product should the regex match?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 13:26:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439528#M125032</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-09-04T13:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Will someone help me with my Regular Expression query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439529#M125033</link>
      <description>&lt;P&gt;I actually need for each product. I want to see if any product has Null price in it. So basically these items u consider as in customer basket so before we proceed for order placing we want to know if there is anything which does not have any price associated with it?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 13:47:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439529#M125033</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2018-09-04T13:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: Will someone help me with my Regular Expression query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439530#M125034</link>
      <description>&lt;P&gt;Looking at the first product, we can do something like that to extract the two sets -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\\P1(?&amp;lt;name1&amp;gt;.*)(?&amp;lt;price1&amp;gt;\d.\d\d) Dol\\(?&amp;lt;name2&amp;gt;.*)(?&amp;lt;price2&amp;gt;\d.\d\d) Dol\\ P2
&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/5705i23D651FDA91D41C6/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, 04 Sep 2018 14:49:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439530#M125034</guid>
      <dc:creator>ddrillic</dc:creator>
      <dc:date>2018-09-04T14:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Will someone help me with my Regular Expression query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439531#M125035</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;Try this.

    | makeresults 
     | eval _raw = "\P1 S+ box 5.00 Dol\BUNDLE_1 0.00 Dol\ P2 Not applicable 15.00 Dol\ DISCOUNT\ D1 -12.50 Dol\T1_EXISTING 0.00 Dol\ T2_EXISTING\ D2 Fibre 41.75 Dol\ T3_EXISTING\ P3 Mix 26.66 Dol\ T4_EXISTING\ P4 Weekends 0.00 Dol\P5 Vgg box 5.00 Dol\DISC* -15.81 Dol \P6* -5.00 Dol \P7* Phone line 19.00 Dol \P8* C&amp;amp;C 0.00 Dol \TI_PENT* 0.00 Dol \P9* -11.00 Dol \P10* Bundle2 -18.60 Dol \P11* Extra Fee 0.00 Dol."
     | rex field=_raw max_match=0 "\\s?(?&amp;lt;Product&amp;gt;P\d+)\*?\s" 
     | rex field=_raw max_match=0 "P\d+\*?\s?(\w+\S?\s?\w+\s)?(?&amp;lt;Price&amp;gt;\-?\d+.\d+\s)Dol"
     | rex field=_raw max_match=0 "P\d+\*?\s?(?&amp;lt;Desc&amp;gt;\w+\S?\s?\w+)\s"
     |table Product Price


Hope this helps!
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Sep 2018 17:59:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439531#M125035</guid>
      <dc:creator>imthesplunker</dc:creator>
      <dc:date>2018-09-04T17:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Will someone help me with my Regular Expression query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439532#M125036</link>
      <description>&lt;P&gt;If Product doesn't have negative values , the regex is &lt;CODE&gt;| rex field=_raw max_match=0 "P\d+\*?\s?(\w+\S?\s?\w+\s)?\-?(?&amp;lt;Price&amp;gt;\d+.\d+\s)Dol"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 18:08:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439532#M125036</guid>
      <dc:creator>imthesplunker</dc:creator>
      <dc:date>2018-09-04T18:08:59Z</dc:date>
    </item>
    <item>
      <title>Re: Will someone help me with my Regular Expression query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439533#M125037</link>
      <description>&lt;P&gt;Check this updated one.. using @imthesplunker 's rex for Price... (Please upvote comments and answers)&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
     | eval _raw = "\P1 S+ box 5.00 Dol\BUNDLE_1 0.00 Dol\ P2 Not applicable 15.00 Dol\ DISCOUNT\ D1 -12.50 Dol\T1_EXISTING 0.00 Dol\ T2_EXISTING\ D2 Fibre 41.75 Dol\ T3_EXISTING\ P3 Mix 26.66 Dol\ T4_EXISTING\ P4 Weekends 0.00 Dol\P5 Vgg box 5.00 Dol\DISC* -15.81 Dol \P6* -5.00 Dol \P7* Phone line 19.00 Dol \P8* C&amp;amp;C 0.00 Dol \TI_PENT* 0.00 Dol \P9* -11.00 Dol \P10* Bundle2 -18.60 Dol \P11* Extra Fee 0.00 Dol."
     | rex field=_raw max_match=0 "\\s?(?&amp;lt;Product&amp;gt;P\d+\D?)\s"
     | rex field=_raw max_match=0 "P\d+\*?\s?(\w+\S?\s?\w+\s)?(?&amp;lt;Price&amp;gt;\-?\d+.\d+\s)Dol"
     | table Product Price _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/5706iBCA13EF11EFA6F60/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, 05 Sep 2018 11:47:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439533#M125037</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2018-09-05T11:47:21Z</dc:date>
    </item>
    <item>
      <title>Re: Will someone help me with my Regular Expression query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439534#M125038</link>
      <description>&lt;P&gt;Thank you. After some minor modification that worked smoothly. Many thanks for the help. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Sep 2018 12:31:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Will-someone-help-me-with-my-Regular-Expression-query/m-p/439534#M125038</guid>
      <dc:creator>Shashank_87</dc:creator>
      <dc:date>2018-09-05T12:31:16Z</dc:date>
    </item>
  </channel>
</rss>

