<?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 to extract  fields  between strings in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557970#M9271</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233702"&gt;@cindygibbs_08&lt;/a&gt;&amp;nbsp;can you try this.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search_goes_here&amp;gt;
| rex  field=HEAD "Hotel\=(?&amp;lt;RESERV_CODE&amp;gt;[-\w]+)\|"&lt;/LI-CODE&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;An upvote&amp;nbsp; would be appreciated and Accept solution if it helps!&lt;/P&gt;</description>
    <pubDate>Thu, 01 Jul 2021 04:15:00 GMT</pubDate>
    <dc:creator>venkatasri</dc:creator>
    <dc:date>2021-07-01T04:15:00Z</dc:date>
    <item>
      <title>Regex to extract  fields  between strings</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557960#M9266</link>
      <description>&lt;P&gt;Hello guys I hope you are doing well,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It turns out I am in need of a regex that will allow me to extract a "fixed" or "static" pattern within a field that is called HEAD in a splunk search that I have... this so-called HEAD field will start with any kind of words/numbers/strings... but will always have at some point the pattern "***\|Hotel=YY-4857UU45547|" wich is three (*) followed by "\|Hotel=" and then a combination of words and numbers and this pattern with always end with a "|" .... this will may always have some other kinds of words of number after that last "|" so what i an trying to acchive is estracting only the pattern that we know to be always consistent... to show you an example this is one of the real values of that field:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults
| eval HEAD=" 487542 For Flight Toronto AV TAX VIP client UBER_LIFT_ 78547  ***\|Hotel=YY-4857UU45547| aws not equip Need end seat 1U"&lt;/LI-CODE&gt;&lt;P&gt;and I would like a regex that will allow me to extract:&lt;BR /&gt;&lt;BR /&gt;YY-4857UU45547&lt;BR /&gt;&lt;BR /&gt;and put it in a new field name: RESERV_CODE&lt;BR /&gt;&lt;BR /&gt;I have tried all day and all nig I will ne so thankful to any of you lovely people who can help me out tahnk you so much&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;love;&lt;BR /&gt;cindy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 03:04:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557960#M9266</guid>
      <dc:creator>cindygibbs_08</dc:creator>
      <dc:date>2021-07-01T03:04:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract  fields  between strings</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557962#M9267</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233702"&gt;@cindygibbs_08&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can you try this?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search_goes_here&amp;gt;
| rex field="HEAD" "\*\*\*\\\|Hotel\=(?&amp;lt;RESERVE_CODE&amp;gt;[-\w]+)"&lt;/LI-CODE&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;An upvote would be appreciated and Accept solution if it helps!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 03:29:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557962#M9267</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-01T03:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract  fields  between strings</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557963#M9268</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163730"&gt;@venkatasri&lt;/a&gt;&amp;nbsp; thank you for your help !!! Your code is great but... It does not give the RESERV_CODE until the last "|" but rather gives me the rest of the string in HEAD.. am I doing something wrong?&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 03:37:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557963#M9268</guid>
      <dc:creator>cindygibbs_08</dc:creator>
      <dc:date>2021-07-01T03:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract  fields  between strings</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557966#M9269</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233702"&gt;@cindygibbs_08&lt;/a&gt;&amp;nbsp;Looks fine to me, is that same sample that you have tested?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you share how the end result looks like and what was the original event?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2021-07-01 at 1.39.39 PM.png" style="width: 963px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/14907iB0F7FE07D8BC6615/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-07-01 at 1.39.39 PM.png" alt="Screenshot 2021-07-01 at 1.39.39 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 03:43:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557966#M9269</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-01T03:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract  fields  between strings</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557967#M9270</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163730"&gt;@venkatasri&lt;/a&gt;&amp;nbsp; hi! Yeah is the same but When I put it in splunk I get everything after the "=" basically...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 03:47:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557967#M9270</guid>
      <dc:creator>cindygibbs_08</dc:creator>
      <dc:date>2021-07-01T03:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Regex to extract  fields  between strings</title>
      <link>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557970#M9271</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/233702"&gt;@cindygibbs_08&lt;/a&gt;&amp;nbsp;can you try this.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your_search_goes_here&amp;gt;
| rex  field=HEAD "Hotel\=(?&amp;lt;RESERV_CODE&amp;gt;[-\w]+)\|"&lt;/LI-CODE&gt;&lt;P&gt;--&lt;/P&gt;&lt;P&gt;An upvote&amp;nbsp; would be appreciated and Accept solution if it helps!&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jul 2021 04:15:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/Regex-to-extract-fields-between-strings/m-p/557970#M9271</guid>
      <dc:creator>venkatasri</dc:creator>
      <dc:date>2021-07-01T04:15:00Z</dc:date>
    </item>
  </channel>
</rss>

