<?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: Need the correct regular expression for my rex command in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Need-the-correct-regular-expression-for-my-rex-command/m-p/436287#M173298</link>
    <description>&lt;P&gt;@moizmmz ,&lt;/P&gt;

&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "tag\":\"ecs-(?&amp;lt;TAG&amp;gt;.+?)-\d+"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 30 Jan 2019 01:25:17 GMT</pubDate>
    <dc:creator>renjith_nair</dc:creator>
    <dc:date>2019-01-30T01:25:17Z</dc:date>
    <item>
      <title>Need the correct regular expression for my rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-the-correct-regular-expression-for-my-rex-command/m-p/436286#M173297</link>
      <description>&lt;P&gt;Here is my raw data:&lt;/P&gt;

&lt;P&gt;{"line":"level=debug t=\"2019-01-29T19:47:20.971Z\" rt=1 method=GET path=\"/service/health?apikey=DEFAULT\" sc=200 dma=999 apikey=DEFAULT amzn_trace_id=unknown enabledFeatures=recommendations,upcomingSearch,popularityQueriesPlatformSpecific,availabilityTimes,avoidDefaultQuery,useFavoritesExternalSchemaForD2C,useFavoritesV2ForFavoritesFilter,endCardRecommendations,cmsAuthFallback os=1 rid=\"dpp-proxy-draft-db0ae210-2baf-42e7-bd88-1379d3efb157\" mode=draft","source":"stderr","tag":"ecs-&lt;STRONG&gt;dev_dpp-proxy-draft_v1_blue&lt;/STRONG&gt;-798-dev-service-dpp-proxy-draft-96eda4add3ca82ec5600/8c19f5d7ff4b","attrs":{"SERVICE_NAME":"dpp-proxy-draft","SERVICE_TAGS":"dpp-proxy","SERVICE_VERSION":"v1","com.amazonaws.ecs.task-arn":"arn:aws:ecs:us-west-2:776609208984:task/497f2b51-9bb7-4fb1-bce9-4058561bb2ad"}}&lt;/P&gt;

&lt;P&gt;I hope to extract the highlighted portion seen above. &lt;/P&gt;

&lt;P&gt;Pls help!!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 23:00:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-the-correct-regular-expression-for-my-rex-command/m-p/436286#M173297</guid>
      <dc:creator>moizmmz</dc:creator>
      <dc:date>2020-09-29T23:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need the correct regular expression for my rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-the-correct-regular-expression-for-my-rex-command/m-p/436287#M173298</link>
      <description>&lt;P&gt;@moizmmz ,&lt;/P&gt;

&lt;P&gt;Try&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex "tag\":\"ecs-(?&amp;lt;TAG&amp;gt;.+?)-\d+"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Jan 2019 01:25:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-the-correct-regular-expression-for-my-rex-command/m-p/436287#M173298</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2019-01-30T01:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need the correct regular expression for my rex command</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Need-the-correct-regular-expression-for-my-rex-command/m-p/436288#M173299</link>
      <description>&lt;P&gt;You can try this,&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Your  index |  rex field=_raw "tag\"\:\"ecs-(?P&amp;lt;field_name&amp;gt;[^798]+)\-"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;let me know if this works.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Jan 2019 08:24:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Need-the-correct-regular-expression-for-my-rex-command/m-p/436288#M173299</guid>
      <dc:creator>vinod94</dc:creator>
      <dc:date>2019-01-30T08:24:56Z</dc:date>
    </item>
  </channel>
</rss>

