<?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: How do you extract a field between 2 fixed words? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-extract-a-field-between-2-fixed-words/m-p/458431#M129448</link>
    <description>&lt;P&gt;Edit: I have tried the below search rather&lt;BR /&gt;
"!CASH OUT" "!TOTAL" | rex "!CASH OUT (?[^!]+)!TOTAL"&lt;/P&gt;</description>
    <pubDate>Fri, 29 Mar 2019 03:58:24 GMT</pubDate>
    <dc:creator>clarkedayne</dc:creator>
    <dc:date>2019-03-29T03:58:24Z</dc:date>
    <item>
      <title>How do you extract a field between 2 fixed words?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-extract-a-field-between-2-fixed-words/m-p/458430#M129447</link>
      <description>&lt;P&gt;Need help extracting\creating a new field between 2 fixed words.&lt;/P&gt;

&lt;P&gt;Example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;!CASH OUT         $100.00!                        !TOTAL
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;!CASH OUT and !TOTAL are fixed, but the value amount in between ($100.00) changes. I would like to create a field, so I can field the events by the cash out amount ect.&lt;/P&gt;

&lt;P&gt;I have tried the below search, but it doesn't return any results&lt;/P&gt;

&lt;P&gt;"&lt;CODE&gt;!CASH OUT" "!TOTAL" | rex "!CASH OUT (?[^!]+)!TOTAL&lt;/CODE&gt;"&lt;/P&gt;

&lt;P&gt;Thank you, any assistance will be much appreciated&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 03:57:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-extract-a-field-between-2-fixed-words/m-p/458430#M129447</guid>
      <dc:creator>clarkedayne</dc:creator>
      <dc:date>2019-03-29T03:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do you extract a field between 2 fixed words?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-extract-a-field-between-2-fixed-words/m-p/458431#M129448</link>
      <description>&lt;P&gt;Edit: I have tried the below search rather&lt;BR /&gt;
"!CASH OUT" "!TOTAL" | rex "!CASH OUT (?[^!]+)!TOTAL"&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2019 03:58:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-extract-a-field-between-2-fixed-words/m-p/458431#M129448</guid>
      <dc:creator>clarkedayne</dc:creator>
      <dc:date>2019-03-29T03:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do you extract a field between 2 fixed words?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-extract-a-field-between-2-fixed-words/m-p/458432#M129449</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Try this rex&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;!CASH\sOUT\s(?P&amp;lt;output&amp;gt;.+)\s!TOTAL
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;!CASH\sOUT\s(?P&amp;lt;output&amp;gt;[^!]+)!\s!TOTAL
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Mar 2019 10:00:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-extract-a-field-between-2-fixed-words/m-p/458432#M129449</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2019-03-29T10:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do you extract a field between 2 fixed words?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-you-extract-a-field-between-2-fixed-words/m-p/458433#M129450</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw="!CASH OUT         $100.00!                        !TOTAL"
| rex "!CASH\s+OUT\s+\$(?&amp;lt;cash&amp;gt;[\d\.]+)!\s+!TOTAL"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 01 Apr 2019 04:55:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-you-extract-a-field-between-2-fixed-words/m-p/458433#M129450</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2019-04-01T04:55:17Z</dc:date>
    </item>
  </channel>
</rss>

