<?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 help in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/452232#M128060</link>
    <description>&lt;P&gt;Hi JPaule,&lt;/P&gt;

&lt;P&gt;give this a try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval foo="s3://this-is-bucket-name/test/AWSLogs/123457276024/Config/us-gov-west-1/2019/5/6/ConfigHistory/123457276024_Config_us-gov-west-1_ConfigHistory_AWS::EC2::VPC_20190506T182522Z_20190506T182912Z_1.json.gz" 
| rex field=foo "(?&amp;lt;s3BucketName&amp;gt;^s3:\/\/[^\/]+\/[^\/]+\/AWSLogs\/)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
    <pubDate>Thu, 09 May 2019 19:40:42 GMT</pubDate>
    <dc:creator>MuS</dc:creator>
    <dc:date>2019-05-09T19:40:42Z</dc:date>
    <item>
      <title>Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/452231#M128059</link>
      <description>&lt;P&gt;Could someone help me on this regex? I only want the first part of the data up to "AWSLogs". Example Below:&lt;/P&gt;

&lt;P&gt;s3://this-is-bucket-name/test/AWSLogs/123457276024/Config/us-gov-west-1/2019/5/6/ConfigHistory/123457276024_Config_us-gov-west-1_ConfigHistory_AWS::EC2::VPC_20190506T182522Z_20190506T182912Z_1.json.gz&lt;/P&gt;

&lt;P&gt;I only need:&lt;BR /&gt;
s3://this-is-bucket-name/test/AWSLogs&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 00:28:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/452231#M128059</guid>
      <dc:creator>JPaule</dc:creator>
      <dc:date>2020-09-30T00:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/452232#M128060</link>
      <description>&lt;P&gt;Hi JPaule,&lt;/P&gt;

&lt;P&gt;give this a try:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval foo="s3://this-is-bucket-name/test/AWSLogs/123457276024/Config/us-gov-west-1/2019/5/6/ConfigHistory/123457276024_Config_us-gov-west-1_ConfigHistory_AWS::EC2::VPC_20190506T182522Z_20190506T182912Z_1.json.gz" 
| rex field=foo "(?&amp;lt;s3BucketName&amp;gt;^s3:\/\/[^\/]+\/[^\/]+\/AWSLogs\/)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 19:40:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/452232#M128060</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2019-05-09T19:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/452233#M128061</link>
      <description>&lt;P&gt;Please find sample&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|makeresults
|eval myraw="s3://this-is-bucket-name/test/AWSLogs/123457276024/Config/us-gov-west-1/2019/5/6/ConfigHistory/123457276024_Config_us-gov-west-1_ConfigHistory_AWS::EC2::VPC_20190506T182522Z_20190506T182912Z_1.json.gz"
| rex field=myraw "(?&amp;lt;aws_regex&amp;gt;s3:\/\/.+?\/.+?\/.+?\/)"
| table myraw,aws_regex
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;demo in regex101 =&amp;gt; &lt;A href="https://regex101.com/r/KkQkfR/1"&gt;https://regex101.com/r/KkQkfR/1&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 09 May 2019 19:43:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help/m-p/452233#M128061</guid>
      <dc:creator>koshyk</dc:creator>
      <dc:date>2019-05-09T19:43:38Z</dc:date>
    </item>
  </channel>
</rss>

