<?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: Replace digits in regex in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-digits-in-regex/m-p/612402#M212923</link>
    <description>&lt;P&gt;Thank you this worked&lt;/P&gt;</description>
    <pubDate>Thu, 08 Sep 2022 11:43:52 GMT</pubDate>
    <dc:creator>Dharani</dc:creator>
    <dc:date>2022-09-08T11:43:52Z</dc:date>
    <item>
      <title>How to replace digits in regex?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-digits-in-regex/m-p/612359#M212907</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Below is the example for raw log:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;20220906T23:43:58&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN class=""&gt;03:00#0115dummyvalue.com#01110.111.169.11:51868#01110.45.38.135:8111#0110.527#011-#011-#011200#011200#0117180#011603#011GET&lt;/SPAN&gt; &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;STRONG&gt;/wapi/v3/gat/cust&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;HTTP/1.1#0115ocilpapgap11.op.okobank.com&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;20220906T23:43:58&lt;/SPAN&gt;&lt;SPAN&gt;+&lt;/SPAN&gt;&lt;SPAN class=""&gt;03:00#0115dummyvalue.com#01110.111.169.11:51868#01110.45.38.135:8111#0110.527#011-#011-#011200#011200#0117180#011603#011GET&lt;/SPAN&gt; &lt;STRONG&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/wapi/v3/gat/cust/api&lt;/SPAN&gt;s/info/015-000234567&lt;/SPAN&gt;&lt;/STRONG&gt;&amp;nbsp;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;HTTP/1.1#0115dummyvalue.com&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;20220906T23:43:58&lt;SPAN&gt;+&lt;/SPAN&gt;03:00#0115dummyvalue.com#01110.111.169.11:51868#01110.45.38.135:8111#0110.527#011-#011-#011200#011200#0117180#011603#011GET&lt;STRONG&gt; &lt;SPAN class=""&gt;/wapi/v3/gat&lt;/SPAN&gt;/015-0000004847/cust/api&lt;/STRONG&gt; &lt;SPAN class=""&gt;HTTP/1.1#0115dummy value.com&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;From the above raw logs I need to extract the below fields:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/wapi/v3/gat/cust&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/wapi/v3/gat/cust/apis/info/&lt;STRONG&gt;015-000234567&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;wapi/v3/gat/&lt;STRONG&gt;015-0000004847&lt;/STRONG&gt;/cust/api &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;and it should be extracted and displayed in table/statistics like below format:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/wmpapi/v3/gat/cust&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;/wapi/v3/gat/cust/apis/info/{Id}&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;wapi/v3/gat/{Id}/cust/api&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Basically in the fields , it should only take alphapets (including that v3) and we should replace digits to {Id} whereever it exist .&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Can someone help me on this.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Thanks!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&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, 08 Sep 2022 16:46:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-digits-in-regex/m-p/612359#M212907</guid>
      <dc:creator>Dharani</dc:creator>
      <dc:date>2022-09-08T16:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Replace digits in regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-digits-in-regex/m-p/612363#M212908</link>
      <description>&lt;LI-CODE lang="markup"&gt;| rex \S+\s(?&amp;lt;URL&amp;gt;\S+)\s
| rex field=URL mode=sed "s/\/[\d\-]+/\/{Id}/g"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 08 Sep 2022 07:36:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-digits-in-regex/m-p/612363#M212908</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-09-08T07:36:29Z</dc:date>
    </item>
    <item>
      <title>Re: Replace digits in regex</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-digits-in-regex/m-p/612402#M212923</link>
      <description>&lt;P&gt;Thank you this worked&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 11:43:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-digits-in-regex/m-p/612402#M212923</guid>
      <dc:creator>Dharani</dc:creator>
      <dc:date>2022-09-08T11:43:52Z</dc:date>
    </item>
  </channel>
</rss>

