<?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: Regex not working on splunk for the expression which works well on regex 101 in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572880#M199657</link>
    <description>&lt;P&gt;No , it is still not working in Splunk with real event. i can see the events but the query is not doing anything the make result is something I tried in all ways and it works with make result but not with the query with original event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| makeresults | eval Request-all-Headers="Accept - */* Authorization - Bearer m6CsheaxrlMKIBH3vZ0EXk5G3rw6 Content-Type - application/json Host - api.ingrammicro.com IM-CorrelationID - 213.45245849 IM-CountryCode - TN IM-CustomerNumber - 44-999999 IM-SenderID - Global Reward Solutions simulateStatus - IM::SHIPPED X-Forwarded-For - 10.0.0.0X-Forwarded-Port - 123 X-Forwarded-Proto - https" | rex field=Request-all-Headers "IM-CountryCode\s+-\s+(?P&amp;lt;country&amp;gt;[A-Z]{2})"&lt;BR /&gt;| rex field=Request-all-Headers "IM-CustomerNumber\s+-\s+(?P&amp;lt;custno&amp;gt;[0-9]+-[0-9]{6})" | table Request-all-Headers country custno&lt;/P&gt;</description>
    <pubDate>Thu, 28 Oct 2021 21:00:39 GMT</pubDate>
    <dc:creator>Shariq</dc:creator>
    <dc:date>2021-10-28T21:00:39Z</dc:date>
    <item>
      <title>Regex not working on splunk for the expression which works well on regex 101</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572872#M199653</link>
      <description>&lt;P&gt;i have data as below :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Request-all-Headers = Accept - */* Authorization - Bearer m6CsheaxrlMKIBH3vZ0EXk5G3rw6 Content-Type - application/json Host - api.ingrammicro.com IM-CorrelationID - 213.45245849 IM-CountryCode - TN IM-CustomerNumber - 44-999999 IM-SenderID - Global Reward Solutions simulateStatus - IM::SHIPPED X-Forwarded-For - 10.0.0.0X-Forwarded-Port - 123 X-Forwarded-Proto - https&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and working rex below from regex 101&amp;nbsp; :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;IM-CountryCode\s+-\s+(?P&amp;lt;country&amp;gt;[A-Z]{2})\s+IM-CustomerNumber\s+-\s+(?P&amp;lt;custno&amp;gt;[0-9]+-[0-9]{6})&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now when I tried the same with splunk. splunk is not able to extract the fields . my splunk query is below :&lt;BR /&gt;&lt;BR /&gt;index=test sourcetype="test"&lt;BR /&gt;| rex field=Request-all-Headers "IM-CountryCode\s+-\s+(?P&amp;lt;country&amp;gt;[A-Z]{2})"&lt;BR /&gt;| rex field=Request-all-Headers "IM-CustomerNumber\s+-\s+(?P&amp;lt;custno&amp;gt;[0-9]+-[0-9]{6})"&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 19:57:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572872#M199653</guid>
      <dc:creator>Shariq</dc:creator>
      <dc:date>2021-10-28T19:57:40Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not working on splunk for the expression which works well on regex 101</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572876#M199655</link>
      <description>&lt;P&gt;Hi, can you try your original search?&lt;BR /&gt;&lt;BR /&gt;| makeresults | eval Request-all-Headers="Accept - */* Authorization - Bearer m6CsheaxrlMKIBH3vZ0EXk5G3rw6 Content-Type - application/json Host - api.ingrammicro.com IM-CorrelationID - 213.45245849 IM-CountryCode - TN IM-CustomerNumber - 44-999999 IM-SenderID - Global Reward Solutions simulateStatus - IM::SHIPPED X-Forwarded-For - 10.0.0.0X-Forwarded-Port - 123 X-Forwarded-Proto - https" | rex field=Request-all-Headers "IM-CountryCode\s+-\s+(?P&amp;lt;country&amp;gt;[A-Z]{2})\s+IM-CustomerNumber\s+-\s+(?P&amp;lt;custno&amp;gt;[0-9]+-[0-9]{6})" | table Request-all-Headers country custno&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jbanAtSplunk_0-1635453233619.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/16651iEB5A4FA15D42E4BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jbanAtSplunk_0-1635453233619.png" alt="jbanAtSplunk_0-1635453233619.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 20:34:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572876#M199655</guid>
      <dc:creator>jbanAtSplunk</dc:creator>
      <dc:date>2021-10-28T20:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not working on splunk for the expression which works well on regex 101</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572880#M199657</link>
      <description>&lt;P&gt;No , it is still not working in Splunk with real event. i can see the events but the query is not doing anything the make result is something I tried in all ways and it works with make result but not with the query with original event.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| makeresults | eval Request-all-Headers="Accept - */* Authorization - Bearer m6CsheaxrlMKIBH3vZ0EXk5G3rw6 Content-Type - application/json Host - api.ingrammicro.com IM-CorrelationID - 213.45245849 IM-CountryCode - TN IM-CustomerNumber - 44-999999 IM-SenderID - Global Reward Solutions simulateStatus - IM::SHIPPED X-Forwarded-For - 10.0.0.0X-Forwarded-Port - 123 X-Forwarded-Proto - https" | rex field=Request-all-Headers "IM-CountryCode\s+-\s+(?P&amp;lt;country&amp;gt;[A-Z]{2})"&lt;BR /&gt;| rex field=Request-all-Headers "IM-CustomerNumber\s+-\s+(?P&amp;lt;custno&amp;gt;[0-9]+-[0-9]{6})" | table Request-all-Headers country custno&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 21:00:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572880#M199657</guid>
      <dc:creator>Shariq</dc:creator>
      <dc:date>2021-10-28T21:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not working on splunk for the expression which works well on regex 101</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572882#M199658</link>
      <description>&lt;P&gt;i even tried changing the variable name but no luck&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 21:05:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572882#M199658</guid>
      <dc:creator>Shariq</dc:creator>
      <dc:date>2021-10-28T21:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not working on splunk for the expression which works well on regex 101</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572883#M199659</link>
      <description>&lt;P&gt;Have you tried on _raw filed?&lt;BR /&gt;like&lt;BR /&gt;rex field=_raw "your_regex"&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 21:11:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572883#M199659</guid>
      <dc:creator>jbanAtSplunk</dc:creator>
      <dc:date>2021-10-28T21:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not working on splunk for the expression which works well on regex 101</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572884#M199660</link>
      <description>&lt;P&gt;i did not try _raw earlier but when I did just now,it worked. but still, I am not clear why request-all-header is not working since I can see that this field is getting extracted properly without any rex.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Oct 2021 21:20:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572884#M199660</guid>
      <dc:creator>Shariq</dc:creator>
      <dc:date>2021-10-28T21:20:59Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not working on splunk for the expression which works well on regex 101</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572940#M199686</link>
      <description>&lt;P&gt;Try putting the field name in single quotes in the rex command&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 12:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/572940#M199686</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-10-29T12:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Regex not working on splunk for the expression which works well on regex 101</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/573033#M199731</link>
      <description>&lt;P&gt;single quote did not worked&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 20:48:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-not-working-on-splunk-for-the-expression-which-works-well/m-p/573033#M199731</guid>
      <dc:creator>Shariq</dc:creator>
      <dc:date>2021-10-29T20:48:01Z</dc:date>
    </item>
  </channel>
</rss>

