<?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 rex n replace or rex and optional find in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/rex-n-replace-or-rex-and-optional-find/m-p/165716#M186072</link>
    <description>&lt;P&gt;cs_username field contains multiple formats of username in the form of:&lt;BR /&gt;
username&lt;BR /&gt;
domain\usernam&lt;BR /&gt;
&lt;A href="mailto:username@domain.com"&gt;username@domain.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Q #1 How to I remove domain\ or @domian.com elegantly&lt;/P&gt;

&lt;P&gt;&amp;amp;&lt;/P&gt;

&lt;P&gt;Q #2 How do I deduplicate those usernames that have different case sensitivies&lt;BR /&gt;
username&lt;BR /&gt;
USERNAME&lt;/P&gt;

&lt;P&gt;I just want one list of usernames to pipe back into a subsearch&lt;/P&gt;

&lt;P&gt;Driving me crazy.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Oct 2014 21:14:15 GMT</pubDate>
    <dc:creator>TobiasBoone</dc:creator>
    <dc:date>2014-10-16T21:14:15Z</dc:date>
    <item>
      <title>rex n replace or rex and optional find</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-n-replace-or-rex-and-optional-find/m-p/165716#M186072</link>
      <description>&lt;P&gt;cs_username field contains multiple formats of username in the form of:&lt;BR /&gt;
username&lt;BR /&gt;
domain\usernam&lt;BR /&gt;
&lt;A href="mailto:username@domain.com"&gt;username@domain.com&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Q #1 How to I remove domain\ or @domian.com elegantly&lt;/P&gt;

&lt;P&gt;&amp;amp;&lt;/P&gt;

&lt;P&gt;Q #2 How do I deduplicate those usernames that have different case sensitivies&lt;BR /&gt;
username&lt;BR /&gt;
USERNAME&lt;/P&gt;

&lt;P&gt;I just want one list of usernames to pipe back into a subsearch&lt;/P&gt;

&lt;P&gt;Driving me crazy.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2014 21:14:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-n-replace-or-rex-and-optional-find/m-p/165716#M186072</guid>
      <dc:creator>TobiasBoone</dc:creator>
      <dc:date>2014-10-16T21:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: rex n replace or rex and optional find</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-n-replace-or-rex-and-optional-find/m-p/165717#M186073</link>
      <description>&lt;P&gt;Something like this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;main search foo [subsearch foo | eval username = lower(replace(username, "@.*", "")) | dedup username | fields username]
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Removes everything after an @ symbol, converts to lower case, dedups, builds a huge OR'd expression to filter the main search.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2014 22:05:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-n-replace-or-rex-and-optional-find/m-p/165717#M186073</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-10-16T22:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: rex n replace or rex and optional find</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-n-replace-or-rex-and-optional-find/m-p/165718#M186074</link>
      <description>&lt;P&gt;I wasn't using eval in conjunction with the replace command correctly &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;This example with another pipe to eval to get rid of the domain\ seems to be doing the trick.  Thank you SO much.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Oct 2014 19:27:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-n-replace-or-rex-and-optional-find/m-p/165718#M186074</guid>
      <dc:creator>TobiasBoone</dc:creator>
      <dc:date>2014-10-20T19:27:04Z</dc:date>
    </item>
    <item>
      <title>Re: rex n replace or rex and optional find</title>
      <link>https://community.splunk.com/t5/Splunk-Search/rex-n-replace-or-rex-and-optional-find/m-p/165719#M186075</link>
      <description>&lt;P&gt;Does that mean your question is solved?&lt;/P&gt;</description>
      <pubDate>Mon, 20 Oct 2014 22:36:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/rex-n-replace-or-rex-and-optional-find/m-p/165719#M186075</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-10-20T22:36:18Z</dc:date>
    </item>
  </channel>
</rss>

