<?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 Regex help please in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466027#M191785</link>
    <description>&lt;P&gt;I have field username - they show up as username=mike and in some cases username=mike.   with a dot in the end. How do I remove the dot from end? This is messing my stats values(xyz) by username. &lt;/P&gt;</description>
    <pubDate>Thu, 02 Apr 2020 15:51:28 GMT</pubDate>
    <dc:creator>dmenon</dc:creator>
    <dc:date>2020-04-02T15:51:28Z</dc:date>
    <item>
      <title>Regex help please</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466027#M191785</link>
      <description>&lt;P&gt;I have field username - they show up as username=mike and in some cases username=mike.   with a dot in the end. How do I remove the dot from end? This is messing my stats values(xyz) by username. &lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 15:51:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466027#M191785</guid>
      <dc:creator>dmenon</dc:creator>
      <dc:date>2020-04-02T15:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help please</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466028#M191786</link>
      <description>&lt;P&gt;Hi @dmenon,&lt;BR /&gt;
if you username hasn't spaces, you can try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=username "^(?&amp;lt;username&amp;gt;\w+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/mfLTm3/1"&gt;https://regex101.com/r/mfLTm3/1&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;if instead you could have spaces in the username field, you could try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex field=username "^(?&amp;lt;username&amp;gt;.+)(\.|$)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;that you can test at &lt;A href="https://regex101.com/r/mfLTm3/2"&gt;https://regex101.com/r/mfLTm3/2&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 16:10:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466028#M191786</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-04-02T16:10:38Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help please</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466029#M191787</link>
      <description>&lt;P&gt;If a period is legal inside, but the line always has to end with a period, this might work for you:&lt;BR /&gt;
&lt;CODE&gt;|rex field=username "username=(?&amp;lt;username&amp;gt;.+)\.$"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 16:41:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466029#M191787</guid>
      <dc:creator>jpolvino</dc:creator>
      <dc:date>2020-04-02T16:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help please</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466030#M191788</link>
      <description>&lt;P&gt;Hi dyude @dmenon ,&lt;/P&gt;

&lt;P&gt;You can try this, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;rex field=username "(?P&amp;lt;username&amp;gt;[^\.]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Apr 2020 17:39:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466030#M191788</guid>
      <dc:creator>vinod94</dc:creator>
      <dc:date>2020-04-02T17:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help please</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466031#M191789</link>
      <description>&lt;P&gt;There are many ways; here is one:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | rex field=username mode=sed "s/\.+$//g"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Apr 2020 22:56:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466031#M191789</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2020-04-02T22:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Regex help please</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466032#M191790</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Try this also&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;........| eval username=replace(username,".$","")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Apr 2020 03:01:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-help-please/m-p/466032#M191790</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2020-04-03T03:01:02Z</dc:date>
    </item>
  </channel>
</rss>

