<?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 write a regex for string followed by number? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412901#M119003</link>
    <description>&lt;P&gt;Does this work? &lt;CODE&gt;regex "(EXT_CODE\d{1,3}=|GEN_CODE\d{1,3}=)&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Aug 2018 15:46:12 GMT</pubDate>
    <dc:creator>tomawest</dc:creator>
    <dc:date>2018-08-20T15:46:12Z</dc:date>
    <item>
      <title>How to write a regex for string followed by number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412895#M118997</link>
      <description>&lt;P&gt;Below are my 3 logs, i want to write a query, to get all the below 3 logs:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;**EXT_CODE*[0-9]** with 1/2/3 digit followed by EXT_CODE

index="zync*"|EXT_CODE2=AB003|EXT_CODE35=BC003|EXT_CODE4=CA010|GEN_CODE14=CD010
index="zync*"CDT|EXT_CODE4=XY005|EXT_CODE42=DE040|EXT_CODE4=ZQ019|GEN_CODE11=PY016
index="zync*"|EXT_CODE5=PC099|EXT_CODE22=BC054|EXT_CODE4=ZC018|GEN_CODE11=ZV010
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can some one please suggest the query&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;my query: index="zync*" EXT_CODE[0-9]*="*" 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Aug 2018 10:41:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412895#M118997</guid>
      <dc:creator>arjun_krishna</dc:creator>
      <dc:date>2018-08-20T10:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a regex for string followed by number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412896#M118998</link>
      <description>&lt;P&gt;can you please share some sample logs and what you need to extract..&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 11:38:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412896#M118998</guid>
      <dc:creator>493669</dc:creator>
      <dc:date>2018-08-20T11:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a regex for string followed by number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412897#M118999</link>
      <description>&lt;P&gt;log1: index="zync*"|EXT_CODE2=AB003|EXT_CODE35=BC003|EXT_CODE4=CA010|GEN_CODE14=CD010&lt;BR /&gt;
log2: index="zync*"CDT|EXT_CODE4=XY005|EXT_CODE42=DE040|EXT_CODE4=ZQ019|GEN_CODE11=PY016&lt;BR /&gt;
log3: index="zync*"|EXT_CODE5=PC099|EXT_CODE22=BC054|EXT_CODE4=ZC018|GEN_CODE11=ZV010&lt;/P&gt;

&lt;P&gt;from multiple logs, i have to get above logs which are having  EXT_CODE followed by 1/2/3 digit followed (Eg: EXT_CODE017 (or) EXT_CODE001 (or) EXT_CODE999 (or) ......)&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:57:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412897#M118999</guid>
      <dc:creator>arjun_krishna</dc:creator>
      <dc:date>2020-09-29T20:57:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a regex for string followed by number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412898#M119000</link>
      <description>&lt;P&gt;provided that that is the _raw, if you just need to find the events you can use the regex command:&lt;/P&gt;

&lt;P&gt;| makeresults&lt;BR /&gt;&lt;BR /&gt;
|  eval _raw="EXT_CODE5=PC099|EXT_CODE22=BC054|EXT_CODE4=ZC018|GEN_CODE11=ZV010" &lt;BR /&gt;
| regex "(EXT|GEN)_CODE\d{1,3}="&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:57:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412898#M119000</guid>
      <dc:creator>mhoogcarspel_sp</dc:creator>
      <dc:date>2020-09-29T20:57:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a regex for string followed by number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412899#M119001</link>
      <description>&lt;P&gt;regex "EXT_CODE\d{1,3}="&lt;BR /&gt;
This is working for me , but i want both &lt;STRONG&gt;EXT_CODE&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;GEN_CODE&lt;/STRONG&gt; followed by 1/2/3 digit followed (Eg: GEN_CODE017 (or) GEN_CODE001 (or) GEN_CODE999 (or) EXT_CODE017 (or) EXT_CODE001 (or) EXT_CODE999 (or) ......) &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 20:57:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412899#M119001</guid>
      <dc:creator>arjun_krishna</dc:creator>
      <dc:date>2020-09-29T20:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a regex for string followed by number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412900#M119002</link>
      <description>&lt;P&gt;@mhoogcarspel , Please respond&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 14:07:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412900#M119002</guid>
      <dc:creator>arjun_krishna</dc:creator>
      <dc:date>2018-08-20T14:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a regex for string followed by number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412901#M119003</link>
      <description>&lt;P&gt;Does this work? &lt;CODE&gt;regex "(EXT_CODE\d{1,3}=|GEN_CODE\d{1,3}=)&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 15:46:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412901#M119003</guid>
      <dc:creator>tomawest</dc:creator>
      <dc:date>2018-08-20T15:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a regex for string followed by number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412902#M119004</link>
      <description>&lt;P&gt;Missed that part &lt;/P&gt;

&lt;P&gt;(EXT|GEN)_CODE\d{1,3}=&lt;/P&gt;

&lt;P&gt;should work for that&lt;/P&gt;

&lt;P&gt;btw, I use regex101 for a lot of these things:&lt;BR /&gt;
&lt;A href="https://regex101.com/r/RfKqEt/2"&gt;https://regex101.com/r/RfKqEt/2&lt;/A&gt;&lt;BR /&gt;
really great tool&lt;/P&gt;</description>
      <pubDate>Mon, 20 Aug 2018 15:47:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412902#M119004</guid>
      <dc:creator>mhoogcarspel_sp</dc:creator>
      <dc:date>2018-08-20T15:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to write a regex for string followed by number?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412903#M119005</link>
      <description>&lt;P&gt;Great its working for me&lt;/P&gt;</description>
      <pubDate>Tue, 21 Aug 2018 09:55:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-write-a-regex-for-string-followed-by-number/m-p/412903#M119005</guid>
      <dc:creator>arjun_krishna</dc:creator>
      <dc:date>2018-08-21T09:55:34Z</dc:date>
    </item>
  </channel>
</rss>

