<?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 edit my regex to remove all text before &amp;quot;:&amp;quot; if there is more than one in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regex-to-remove-all-text-before-quot-quot-if/m-p/600289#M208974</link>
    <description>&lt;P&gt;Try this command.&amp;nbsp; There may be other expressions that accomplish the same thing, but this one matches the examples provided.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=my_host ":(?&amp;lt;my_host&amp;gt;[^\:]+):?$"&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 02 Jun 2022 13:41:19 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-06-02T13:41:19Z</dc:date>
    <item>
      <title>How to edit my regex to remove all text before ":" if there is more than one</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regex-to-remove-all-text-before-quot-quot-if/m-p/600286#M208971</link>
      <description>&lt;P&gt;Hello Team, Splunkers,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a correlation search and need to use a regex expression to strip all text before a column ":". Following the suggestion presented in:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regex-to-remove-all-text-before-an-optional/m-p/259105" target="_blank" rel="noopener"&gt;https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regex-to-remove-all-text-before-an-optional/m-p/259105&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I managed to strip the text using this expression which was derived from the topic above:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;| rex field=my_host "(?&amp;lt;my_host&amp;gt;[^\:]+)$"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and apply it to the following line:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft.Windows.Server.10.0.LogicalDisk:my_host.server;D&amp;nbsp;&lt;/P&gt;&lt;P&gt;it will work and I will receive:&amp;nbsp;&lt;STRONG&gt;my_host.server;D&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;However if I apply the above expression to the same line but with column at the end of the string looking like this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft.Windows.Server.10.0.LogicalDisk:my_host.server;D:&lt;/P&gt;&lt;P&gt;this will not be matched. Could you please assist me with editing my expression to cover both cases and still get&amp;nbsp;&lt;STRONG&gt;my_host.server;D&amp;nbsp;&lt;/STRONG&gt;as a result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards Nikolay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2022 13:16:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regex-to-remove-all-text-before-quot-quot-if/m-p/600286#M208971</guid>
      <dc:creator>nikolaevnz</dc:creator>
      <dc:date>2022-06-02T13:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my regex to remove all text before ":" if there is more than one</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regex-to-remove-all-text-before-quot-quot-if/m-p/600289#M208974</link>
      <description>&lt;P&gt;Try this command.&amp;nbsp; There may be other expressions that accomplish the same thing, but this one matches the examples provided.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=my_host ":(?&amp;lt;my_host&amp;gt;[^\:]+):?$"&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 02 Jun 2022 13:41:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regex-to-remove-all-text-before-quot-quot-if/m-p/600289#M208974</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-06-02T13:41:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my regex to remove all text before ":" if there is more than one</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regex-to-remove-all-text-before-quot-quot-if/m-p/600787#M209123</link>
      <description>&lt;P&gt;Thank you for the help it woks as intended.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 06:31:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-regex-to-remove-all-text-before-quot-quot-if/m-p/600787#M209123</guid>
      <dc:creator>nikolaevnz</dc:creator>
      <dc:date>2022-06-07T06:31:29Z</dc:date>
    </item>
  </channel>
</rss>

