<?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 extract a string before the @ symbol from an email adress? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-string-before-the-symbol-from-an-email-adress/m-p/464508#M130912</link>
    <description>&lt;P&gt;Hi @pavanae&lt;BR /&gt;
Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype_X]
EXTRACT-UVW = emailUser="(?&amp;lt;emailUser&amp;gt;[^\@]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 10 Feb 2020 16:21:12 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2020-02-10T16:21:12Z</dc:date>
    <item>
      <title>how to extract a string before the @ symbol from an email adress?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-string-before-the-symbol-from-an-email-adress/m-p/464507#M130911</link>
      <description>&lt;P&gt;I have the username filed extraction as follows in the props.conf which extracts the email address:-&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [sourcetype_X]
 EXTRACT-XYZ = username="(?&amp;lt;user&amp;gt;[^+\"]*)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;which extracts the field as follows&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; x12345@abc-def-ghij-01.com
 y67891@klm-def-ghij-01.com
 z45787@abc-def-ghij-01.com
 ABC-DEF
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Now what would be regex stanza to extract the username as follows from the above&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;x12345
 y67891
 z45787
 ABC-DEF
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Feb 2020 16:19:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-string-before-the-symbol-from-an-email-adress/m-p/464507#M130911</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2020-02-10T16:19:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a string before the @ symbol from an email adress?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-string-before-the-symbol-from-an-email-adress/m-p/464508#M130912</link>
      <description>&lt;P&gt;Hi @pavanae&lt;BR /&gt;
Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype_X]
EXTRACT-UVW = emailUser="(?&amp;lt;emailUser&amp;gt;[^\@]+)"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Feb 2020 16:21:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-string-before-the-symbol-from-an-email-adress/m-p/464508#M130912</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-02-10T16:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to extract a string before the @ symbol from an email adress?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-string-before-the-symbol-from-an-email-adress/m-p/464509#M130913</link>
      <description>&lt;P&gt;You can extract the name as below&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[sourcetype_X]
  EXTRACT-XYZ = username="(?&amp;lt;name&amp;gt;[^+\"]*)@"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Feb 2020 16:27:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/how-to-extract-a-string-before-the-symbol-from-an-email-adress/m-p/464509#M130913</guid>
      <dc:creator>Vijeta</dc:creator>
      <dc:date>2020-02-10T16:27:53Z</dc:date>
    </item>
  </channel>
</rss>

