<?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 Regular expression with lookup in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422951#M121419</link>
    <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;Blockquote&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I have to build a table that lists all the service names that are in particular format for e.g "ABC-*.-&amp;lt;&amp;gt;", Is this possible??&lt;/P&gt;

&lt;P&gt;I actually tried by building a regular expression like this index=my_index sourcetype=my_source | regex name = "^ABC-.*-(Name1|Name2|Name3|Name4|....Name600) but I am getting "Regex: regular expression too large error" Any other way of solving this??&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Blockquote&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Tue, 29 Sep 2020 19:43:10 GMT</pubDate>
    <dc:creator>stang1234</dc:creator>
    <dc:date>2020-09-29T19:43:10Z</dc:date>
    <item>
      <title>Regular expression with lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422951#M121419</link>
      <description>&lt;BLOCKQUOTE&gt;
&lt;P&gt;Blockquote&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;I have to build a table that lists all the service names that are in particular format for e.g "ABC-*.-&amp;lt;&amp;gt;", Is this possible??&lt;/P&gt;

&lt;P&gt;I actually tried by building a regular expression like this index=my_index sourcetype=my_source | regex name = "^ABC-.*-(Name1|Name2|Name3|Name4|....Name600) but I am getting "Regex: regular expression too large error" Any other way of solving this??&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;Blockquote&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:43:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422951#M121419</guid>
      <dc:creator>stang1234</dc:creator>
      <dc:date>2020-09-29T19:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression with lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422952#M121420</link>
      <description>&lt;P&gt;Can you please show some example data?&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 19:42:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422952#M121420</guid>
      <dc:creator>xpac</dc:creator>
      <dc:date>2018-05-29T19:42:38Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression with lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422953#M121421</link>
      <description>&lt;P&gt;Is there a pattern to the service name endings or are they 600 random strings?&lt;BR /&gt;
Regex is better suited to validating data &lt;EM&gt;format&lt;/EM&gt; than &lt;EM&gt;content&lt;/EM&gt;. IOW, use &lt;CODE&gt;rex&lt;/CODE&gt; to determine if a string is a potential service name and extract the "Name*" part.  Then use a lookup to validate the Name against a list of known names.&lt;/P&gt;</description>
      <pubDate>Tue, 29 May 2018 21:31:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422953#M121421</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-05-29T21:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression with lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422954#M121422</link>
      <description>&lt;P&gt;All 600 start with a prefix like “ENV” and rest are random. I did create a lookup with these 600.&lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 11:50:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422954#M121422</guid>
      <dc:creator>stang1234</dc:creator>
      <dc:date>2018-05-30T11:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression with lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422955#M121423</link>
      <description>&lt;P&gt;Try something like this.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=my_index sourcetype=my_source name = "ABC*" | rex field=name "^ABC-.*-(?&amp;lt;subname&amp;gt;.*)" | lookup names.csv name-field-in-lookup-file as subname | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 May 2018 16:00:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422955#M121423</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2018-05-30T16:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression with lookup</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422956#M121424</link>
      <description>&lt;P&gt;Fantastic, that worked!! This is exactly what I was looking for. &lt;/P&gt;</description>
      <pubDate>Wed, 30 May 2018 18:38:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regular-expression-with-lookup/m-p/422956#M121424</guid>
      <dc:creator>stang1234</dc:creator>
      <dc:date>2018-05-30T18:38:45Z</dc:date>
    </item>
  </channel>
</rss>

