<?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: Valid email address: in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107264#M22342</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=have;&lt;/P&gt;&lt;P&gt;tables email;&lt;/P&gt;&lt;P&gt;where index(email, '----');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will print a table based on any email addresses that contain four dashes in a row, anywhere within the address.&amp;nbsp; If you want to cut it to less than 4, that's up to you.&amp;nbsp; You know your data best.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Feb 2013 22:27:39 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2013-02-12T22:27:39Z</dc:date>
    <item>
      <title>Valid email address:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107262#M22340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;As a first step towards data cleaning:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How to get the counts of following where there just hypens before @ in email addresses:&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:------------------------------------@GMAIL.COM"&gt;------------------------------------@GMAIL.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:-------------@-------------.COM"&gt;-------------@-------------.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:-------------@YAHOO.COM"&gt;-------------@YAHOO.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:------------@EMC.COM"&gt;------------@EMC.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:----------@HOTMAIL.COM"&gt;----------@HOTMAIL.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:----------@YAHOO.COM"&gt;----------@YAHOO.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:---------@PRTC.NET"&gt;---------@PRTC.NET&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:---------@--.COM"&gt;---------@--.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:--------@AOL.COM"&gt;--------@AOL.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="mailto:abc@gmail.com"&gt;abc@gmail.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 21:40:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107262#M22340</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2013-02-12T21:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: Valid email address:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107263#M22341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will probably need some Regular expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input email :$char100.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:------------------------------------@GMAIL.COM"&gt;------------------------------------@GMAIL.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-------------@-------------.COM&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:-------------@YAHOO.COM"&gt;-------------@YAHOO.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:------------@EMC.COM"&gt;------------@EMC.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:----------@HOTMAIL.COM"&gt;----------@HOTMAIL.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:----------@YAHOO.COM"&gt;----------@YAHOO.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:---------@PRTC.NET"&gt;---------@PRTC.NET&lt;/A&gt;&lt;/P&gt;&lt;P&gt;---------@--.COM&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:--------@AOL.COM"&gt;--------@AOL.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:abc@gmail.com"&gt;abc@gmail.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:mike-smith@tg-aol.com"&gt;mike-smith@tg-aol.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if prxmatch("/^-+@/",email) then ind=1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;proc print;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 22:24:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107263#M22341</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-02-12T22:24:13Z</dc:date>
    </item>
    <item>
      <title>Re: Valid email address:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107264#M22342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=have;&lt;/P&gt;&lt;P&gt;tables email;&lt;/P&gt;&lt;P&gt;where index(email, '----');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It will print a table based on any email addresses that contain four dashes in a row, anywhere within the address.&amp;nbsp; If you want to cut it to less than 4, that's up to you.&amp;nbsp; You know your data best.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 22:27:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107264#M22342</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-02-12T22:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: Valid email address:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107265#M22343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had to ask, what if you want to keep:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:abc-xyz@gmail.com"&gt;abc----xyz@gmail.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;but to drop:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:-@gmail.com"&gt;----@gmail.com&lt;/A&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still think the Regular expression is the way to go, at least for the first step.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my 2 cents,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 22:32:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107265#M22343</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-02-12T22:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: Valid email address:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107266#M22344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="504807" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;: Since you wanted strings that start with any number of hyphens, then followed with an @, I'll suggest adding one more character to Haikuo's code.&amp;nbsp; The ^ at the beginning forces the match to have occurred at the start of the string:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; informat email $50.;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input email;&lt;/P&gt;&lt;P&gt;&amp;nbsp; cards;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:------------------------------------@GMAIL.COM"&gt;------------------------------------@GMAIL.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;-------------@-------------.COM&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:-------------@YAHOO.COM"&gt;-------------@YAHOO.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:------------@EMC.COM"&gt;------------@EMC.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:x----------@HOTMAIL.COM"&gt;x----------@HOTMAIL.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:----------@YAHOO.COM"&gt;----------@YAHOO.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:---------@PRTC.NET"&gt;---------@PRTC.NET&lt;/A&gt;&lt;/P&gt;&lt;P&gt;---------@--.COM&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:--------@AOL.COM"&gt;--------@AOL.COM&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-email-small" href="mailto:abc@gmail.com"&gt;abc@gmail.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;;&lt;/P&gt;&lt;P&gt;&amp;nbsp; if prxmatch("/^-+@/",email) then ind=1;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 22:34:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107266#M22344</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2013-02-12T22:34:47Z</dc:date>
    </item>
    <item>
      <title>Re: Valid email address:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107267#M22345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; DATA WANT;&lt;/P&gt;&lt;P&gt;SET HAVE;&lt;/P&gt;&lt;P&gt;if index(email,'@')-1 = countc(substr(email,1,index(email,'@')-1),'-');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Feb 2013 22:47:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107267#M22345</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2013-02-12T22:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: Valid email address:</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107268#M22346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I suppose I could switch from this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;index(email, '----')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;index(email, &lt;A href="mailto:'-@'"&gt;'-@'&lt;/A&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2013 02:51:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Valid-email-address/m-p/107268#M22346</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-02-13T02:51:50Z</dc:date>
    </item>
  </channel>
</rss>

