<?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 to extract a string using regex? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-using-regex/m-p/374010#M109944</link>
    <description>&lt;P&gt;Can you show us one sample line of your table and tell us exactly what you want to extract please?&lt;/P&gt;</description>
    <pubDate>Fri, 23 Mar 2018 16:39:29 GMT</pubDate>
    <dc:creator>tiagofbmm</dc:creator>
    <dc:date>2018-03-23T16:39:29Z</dc:date>
    <item>
      <title>How to extract a string using regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-using-regex/m-p/374009#M109943</link>
      <description>&lt;P&gt;Hello all, &lt;/P&gt;

&lt;P&gt;I am trying to write a regex to extract a string out an interesting field that I have already created and wanted to extract a string out by using regex. &lt;BR /&gt;
I created a table that displays 4 different columns and from one of the column, I want to extract out "Message accepted for delivery" and put it into a new column. is there a way to do that. Much appreciate it.  &lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 16:07:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-using-regex/m-p/374009#M109943</guid>
      <dc:creator>AbubakarShahid</dc:creator>
      <dc:date>2018-03-23T16:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a string using regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-using-regex/m-p/374010#M109944</link>
      <description>&lt;P&gt;Can you show us one sample line of your table and tell us exactly what you want to extract please?&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 16:39:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-using-regex/m-p/374010#M109944</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2018-03-23T16:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a string using regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-using-regex/m-p/374011#M109945</link>
      <description>&lt;P&gt;We can't help until there is sample data to test against&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 16:43:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-using-regex/m-p/374011#M109945</guid>
      <dc:creator>skoelpin</dc:creator>
      <dc:date>2018-03-23T16:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract a string using regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-using-regex/m-p/374012#M109946</link>
      <description>&lt;P&gt;You sure can.  But before I get into it, here's a site that can help with your regex expression extractions:&lt;BR /&gt;
&lt;A href="https://regex101.com/"&gt;https://regex101.com/&lt;/A&gt;&lt;BR /&gt;
It would be better if you supplied the whole string in the field containing "Message accepted for delivery", as well as your search, as I can better answer this question with those provided, but this rex should do the trick:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearch | rex field=fieldContainingYourMessage "(?&amp;lt;Message1&amp;gt;Message accepted for delivery)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;What the search above will do will provide you with a new field called Message1 and the content/values will be "Message accepted for delivery"&lt;/P&gt;</description>
      <pubDate>Fri, 23 Mar 2018 16:49:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-a-string-using-regex/m-p/374012#M109946</guid>
      <dc:creator>damiensurat</dc:creator>
      <dc:date>2018-03-23T16:49:27Z</dc:date>
    </item>
  </channel>
</rss>

