<?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 do I search for a string of text with the &amp;quot;@&amp;quot; symbol? some cells contain email add in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882488#M39131</link>
    <description>My code was just to help with thinking about the functions that could work. Did you try running something like:&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;end= scan(columnB,2, "@");&lt;BR /&gt;start = scan(columnB,1, "@");&lt;BR /&gt;email = catx('@', scan(start, -1, ' '), scan(end, 1, ' '));&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 26 Jun 2023 17:23:13 GMT</pubDate>
    <dc:creator>svh</dc:creator>
    <dc:date>2023-06-26T17:23:13Z</dc:date>
    <item>
      <title>How do I search for a string of text with the "@" symbol? some cells contain email addresses</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882468#M39126</link>
      <description>&lt;P&gt;My dataset contains a column with email addresses. For example this is all the text in the variable named columnB:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; " Rima Loki&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; President and Chief Executive Officer&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 1260, boul. René-Lévesque Ouest, bur.600&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Montreal, Québec&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; H3G 0E3&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Telephone : (416) 865-5800&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Email Address : &lt;A href="mailto:Rima.loki@loo.ca" target="_blank"&gt;Rima.loki@loo.ca&lt;/A&gt;&amp;nbsp;"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to extract all the email addresses from this variable so that it only pulls out "Rima.loki@loo.ca"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I do this?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 16:05:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882468#M39126</guid>
      <dc:creator>SASUser_77</dc:creator>
      <dc:date>2023-06-26T16:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882474#M39127</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
&amp;nbsp; &amp;nbsp; &amp;nbsp;set have;
     if find(columnB,'@')&amp;gt;0;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Jun 2023 16:19:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882474#M39127</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-26T16:19:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882475#M39128</link>
      <description>&lt;P&gt;This is a back-of-the-napkin solution that assumes that @ symbols are only in email addresses:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data need;&lt;BR /&gt;email = "blah blah henry_fifth@gmail.com blah"; /* example of a field with text and an email address*/&lt;BR /&gt;end= scan(email,2, "@");&lt;BR /&gt;start = scan(email,1, "@");&lt;BR /&gt;email_new = catx('@', scan(start, -1, ' '), scan(end, 1, ' '));&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 16:29:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882475#M39128</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2023-06-26T16:29:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882477#M39129</link>
      <description>&lt;P&gt;Hello, I received this error message:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;BR /&gt;149:14&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.TEST1 may be incomplete. When this step was stopped there were 0 observations and 1 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would you know how to fix it? Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 16:47:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882477#M39129</guid>
      <dc:creator>SASUser_77</dc:creator>
      <dc:date>2023-06-26T16:47:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882479#M39130</link>
      <description>&lt;P&gt;I do not know the text of each of the email addresses that I need. There are hundreds of email addresses I need to extract.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 16:48:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882479#M39130</guid>
      <dc:creator>SASUser_77</dc:creator>
      <dc:date>2023-06-26T16:48:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882488#M39131</link>
      <description>My code was just to help with thinking about the functions that could work. Did you try running something like:&lt;BR /&gt;&lt;BR /&gt;data want;&lt;BR /&gt;set have;&lt;BR /&gt;end= scan(columnB,2, "@");&lt;BR /&gt;start = scan(columnB,1, "@");&lt;BR /&gt;email = catx('@', scan(start, -1, ' '), scan(end, 1, ' '));&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 26 Jun 2023 17:23:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882488#M39131</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2023-06-26T17:23:13Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882489#M39132</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/308475"&gt;@SASUser_77&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hello, I received this error message:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE: Numeric values have been converted to character values at the places given by: (Line):(Column).&lt;BR /&gt;149:14&lt;BR /&gt;NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;WARNING: The data set WORK.TEST1 may be incomplete. When this step was stopped there were 0 observations and 1 variables.&lt;BR /&gt;NOTE: DATA statement used (Total process time):&lt;BR /&gt;real time 0.00 seconds&lt;BR /&gt;cpu time 0.01 seconds&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you know how to fix it? Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;We don't know what you did.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you get errors or warnings in the log, &lt;STRONG&gt;SHOW US THE ENTIRE LOG &lt;/STRONG&gt;for this data step or PROC. Do not show us parts of the log. Please copy the log as text and then paste it into the window that appears when you click on the &amp;lt;/&amp;gt; icon.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PaigeMiller_0-1663012019648.png" style="width: 859px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/75161i0E71B1489A6C9839/image-size/large?v=v2&amp;amp;px=999" role="button" title="PaigeMiller_0-1663012019648.png" alt="PaigeMiller_0-1663012019648.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 17:25:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882489#M39132</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-26T17:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882499#M39133</link>
      <description>&lt;P&gt;I ran the code again with some fixes to my data and it extracts the whole contents of the cells with email addresses, not just the email addresses.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I attached the log here. I am using SAS in a different window than the screenshot you provided. Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 18:18:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882499#M39133</guid>
      <dc:creator>SASUser_77</dc:creator>
      <dc:date>2023-06-26T18:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882501#M39134</link>
      <description>&lt;P&gt;The output table looks like the original table I have. Maybe I did something wrong.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 18:22:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882501#M39134</guid>
      <dc:creator>SASUser_77</dc:creator>
      <dc:date>2023-06-26T18:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882502#M39135</link>
      <description>&lt;P&gt;Many people, including me, refuse to download Microsoft Office attachments, as they can be security threats. Please provide the log as I explained, click on the &amp;lt;/&amp;gt; icon here in the SAS communities and paste the log into the window that appears.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 18:22:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882502#M39135</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-26T18:22:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882505#M39136</link>
      <description>&lt;P&gt;This is my code:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;libname bank_lib 'P:\temp - to be deleted periodically';&lt;/P&gt;
&lt;P&gt;filename banking 'P:\temp - to be deleted periodically\definitely delete\banking.xlsx';&lt;/P&gt;
&lt;P&gt;proc import datafile=banking&lt;BR /&gt;out=bank_lib.banking&lt;BR /&gt;dbms=xlsx&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;BR /&gt;proc contents data=bank_lib.banking;&lt;BR /&gt;run;&lt;BR /&gt;proc print datat=bank_lib.banking;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;data want;&lt;BR /&gt;set bank_lib.banking;&lt;BR /&gt;if find(columnB,'@')&amp;gt;0;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my log:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M6 MBCS3170)

NOTE: This session is executing on the X64_10PRO  platform.



NOTE: Analytical products:

      SAS/STAT 15.1
      SAS/ETS 15.1
      SAS/OR 15.1
      SAS/IML 15.1
      SAS/QC 15.1

NOTE: Additional host information:

 X64_10PRO WIN 10.0.19041  Workstation

NOTE: SAS initialization used:
      real time           0.89 seconds
      cpu time            0.60 seconds

1
2    libname bank_lib 'P:\temp - to be deleted periodically';
NOTE: Libref BANK_LIB was successfully assigned as follows:
      Engine:        V9
      Physical Name: P:\temp - to be deleted periodically
3
4    filename banking 'P:\temp - to be deleted periodically\definitely delete\banking.xlsx';
5
6    proc import datafile=banking
7                out=bank_lib.banking
8                dbms=xlsx
9                replace;
10   run;

NOTE:    Variable Name Change.  Form 1 - Report Summary -&amp;gt; Form_1___Report_Summary
NOTE:    Variable Name Change.  444 -&amp;gt; _444
NOTE:    Variable Name Change.  Employer Number -&amp;gt; Employer_Number
NOTE:    Variable Name Change.  
PO Box 5777
300 Union St.
Sa -&amp;gt; VAR6
NOTE:    Variable Name Change.  002001 -&amp;gt; _002001
NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with
      options MSGLEVEL=I.
NOTE: The import data set has 905 observations and 7 variables.
NOTE: BANK_LIB.BANKING data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           1.88 seconds
      cpu time            0.11 seconds


11   proc contents data=bank_lib.banking;
NOTE: Writing HTML Body file: sashtml.htm
12   run;

NOTE: PROCEDURE CONTENTS used (Total process time):
      real time           0.70 seconds
      cpu time            0.09 seconds


13   proc print datat=bank_lib.banking;
                -----
                1
WARNING 1-322: Assuming the symbol DATA was misspelled as datat.
14   run;

NOTE: There were 905 observations read from the data set BANK_LIB.BANKING.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.13 seconds
      cpu time            0.12 seconds


15
16   data want;
17        set bank_lib.banking;
18        if find(columnB,'@')&amp;gt;0;
19   run;

NOTE: There were 905 observations read from the data set BANK_LIB.BANKING.
NOTE: The data set WORK.WANT has 22 observations and 7 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds


&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Jun 2023 20:07:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882505#M39136</guid>
      <dc:creator>SASUser_77</dc:creator>
      <dc:date>2023-06-26T20:07:17Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882519#M39139</link>
      <description>&lt;P&gt;I'm lost. This code and this log do not produce the problems you spoke of earlier.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 20:03:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882519#M39139</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-26T20:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882529#M39142</link>
      <description>&lt;P&gt;Sorry, I fixed it so the error message no longer pops up. But when I do run the code it does not extract email addresses only.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 20:24:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882529#M39142</guid>
      <dc:creator>SASUser_77</dc:creator>
      <dc:date>2023-06-26T20:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882530#M39143</link>
      <description>&lt;P&gt;Please show us a portion of the output that you think is not correct. Explain why it is not correct. A screen capture of the output data set is fine; use the "Insert Photos" icon to include the screen capture in your reply. Do NOT attach files.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 20:26:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882530#M39143</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-26T20:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882534#M39144</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find below the output table "want". I redacted some info from the names and email addresses of the people for privacy reasons.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to extract only the email addresses from columnB but this table shows all the text from cells containing email addresses.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="want_capture.PNG" style="width: 907px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85404iA9531B13308DCE8D/image-size/large?v=v2&amp;amp;px=999" role="button" title="want_capture.PNG" alt="want_capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 20:32:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882534#M39144</guid>
      <dc:creator>SASUser_77</dc:creator>
      <dc:date>2023-06-26T20:32:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882538#M39146</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code is untested, as I don't have your data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    nwords=countw(columnB,' ');
    do i=1 to nwords;
        thisword=scan(columnB,i,' ');
        contains_at_symbol=find(thisword,'@');
        if contains_at_symbol&amp;gt;0 then do;
           email_address=thisword;
           output;
        end;
    end;
    drop i nwords thisword;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 20:42:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882538#M39146</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-06-26T20:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882539#M39147</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/308475"&gt;@SASUser_77&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Sorry, I fixed it so the error message no longer pops up. But when I do run the code it does not extract email addresses only.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Because you did not ask it to extract the email address.&amp;nbsp; You only asked it to locate the observations that had&amp;nbsp;@ characters in them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to only extract the words in the string that might be email addresses then perhaps you should loop through the string word by word.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set bank_lib.banking;
  where find(columnB,'@') ;
  length word $200 ;
  do i=1 to countw(columnB,' ');
      word = scan(columnB,i,' ');
      if find(word,'@') then output;
  end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Jun 2023 20:41:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882539#M39147</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-06-26T20:41:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882544#M39148</link>
      <description>&lt;P&gt;When I run the code, it does not seem to extract email addresses only. It looks just like my previous result. Please find below my code and attached is the log and screen capture of my "want" table.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 902px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/85406i3F7ADE0370D5F3BB/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;libname bank_lib 'P:\temp - to be deleted periodically';&lt;/P&gt;&lt;P&gt;filename banking 'P:\temp - to be deleted periodically\definitely delete\banking.xlsx';&lt;/P&gt;&lt;P&gt;proc import datafile=banking&lt;BR /&gt;out=bank_lib.banking&lt;BR /&gt;dbms=xlsx&lt;BR /&gt;replace;&lt;BR /&gt;run;&lt;BR /&gt;proc contents data=bank_lib.banking;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=bank_lib.banking;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;BR /&gt;set bank_lib.banking;&lt;BR /&gt;nwords=countw(columnB,' ');&lt;BR /&gt;do i=1 to nwords;&lt;BR /&gt;thisword=scan(columnB,i,' ');&lt;BR /&gt;contains_at_symbol=find(thisword,'@');&lt;BR /&gt;if contains_at_symbol&amp;gt;0 then do; email_address=thisword; output; end;&lt;BR /&gt;end;&lt;BR /&gt;drop i nwords thisword;&lt;BR /&gt;run;&lt;/P&gt;&lt;PRE&gt;NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M6 MBCS3170)
      Licensed to, Site 70016086.
NOTE: This session is executing on the X64_10PRO  platform.



NOTE: Analytical products:

      SAS/STAT 15.1
      SAS/ETS 15.1
      SAS/OR 15.1
      SAS/IML 15.1
      SAS/QC 15.1

NOTE: Additional host information:

 X64_10PRO WIN 10.0.19041  Workstation

NOTE: SAS initialization used:
      real time           0.89 seconds
      cpu time            0.60 seconds

1
2    libname bank_lib 'P:\temp - to be deleted periodically';
NOTE: Libref BANK_LIB was successfully assigned as follows:
      Engine:        V9
      Physical Name: P:\temp - to be deleted periodically
3
4    filename banking 'P:\temp - to be deleted periodically\definitely delete\banking.xlsx';
5
6    proc import datafile=banking
7                out=bank_lib.banking
8                dbms=xlsx
9                replace;
10   run;

NOTE:    Variable Name Change.  Form 1 - Report Summary -&amp;gt; Form_1___Report_Summary
NOTE:    Variable Name Change.  444 -&amp;gt; _444
NOTE:    Variable Name Change.  Employer Number -&amp;gt; Employer_Number
NOTE:    Variable Name Change.  
PO Box 5777
300 Union St.
Sa -&amp;gt; VAR6
NOTE:    Variable Name Change.  002001 -&amp;gt; _002001
NOTE: One or more variables were converted because the data type is not supported by the V9 engine. For more details, run with
      options MSGLEVEL=I.
NOTE: The import data set has 905 observations and 7 variables.
NOTE: BANK_LIB.BANKING data set was successfully created.
NOTE: PROCEDURE IMPORT used (Total process time):
      real time           1.88 seconds
      cpu time            0.11 seconds


11   proc contents data=bank_lib.banking;
NOTE: Writing HTML Body file: sashtml.htm
12   run;

NOTE: PROCEDURE CONTENTS used (Total process time):
      real time           0.70 seconds
      cpu time            0.09 seconds


13   proc print datat=bank_lib.banking;
                -----
                1
WARNING 1-322: Assuming the symbol DATA was misspelled as datat.
14   run;

NOTE: There were 905 observations read from the data set BANK_LIB.BANKING.
NOTE: PROCEDURE PRINT used (Total process time):
      real time           0.13 seconds
      cpu time            0.12 seconds


15
16   data want;
17        set bank_lib.banking;
18        if find(columnB,'@')&amp;gt;0;
19   run;

NOTE: There were 905 observations read from the data set BANK_LIB.BANKING.
NOTE: The data set WORK.WANT has 22 observations and 7 variables.
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds


20
21   data want;
22       set bank_lib.banking;
23       nwords=countw(columnB,' ');
24       do i=1 to nwords;
25           thisword=scan(columnB,i,' ');
26           contains_at_symbol=find(thisword,'@');
27           if contains_at_symbol&amp;gt;0 then do;           email_address=thisword;           output;        end;
28       end;
29       drop i nwords thisword;
30   run;

ERROR: You cannot open WORK.WANT.DATA for output access with member-level control because WORK.WANT.DATA is in use by you in
resource environment ViewTable Window.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
      real time           0.70 seconds
      cpu time            0.04 seconds


31   data want;
32       set bank_lib.banking;
33       nwords=countw(columnB,' ');
34       do i=1 to nwords;
35           thisword=scan(columnB,i,' ');
36           contains_at_symbol=find(thisword,'@');
37           if contains_at_symbol&amp;gt;0 then do;           email_address=thisword;           output;        end;
38       end;
39       drop i nwords thisword;
40   run;

NOTE: There were 905 observations read from the data set BANK_LIB.BANKING.
NOTE: The data set WORK.WANT has 22 observations and 9 variables.
NOTE: DATA statement used (Total process time):
      real time           0.72 seconds
      cpu time            0.04 seconds


41   data want;
42       set bank_lib.banking;
43       nwords=countw(columnB,' ');
44       do i=1 to nwords;
45           thisword=scan(columnB,i,' ');
46           contains_at_symbol=find(thisword,'@');
47           if contains_at_symbol&amp;gt;0 then do;           email_address=thisword;           output;        end;
48       end;
49       drop i nwords thisword;
50   run;

ERROR: You cannot open WORK.WANT.DATA for output access with member-level control because WORK.WANT.DATA is in use by you in
resource environment ViewTable Window.
NOTE: The SAS System stopped processing this step because of errors.
NOTE: DATA statement used (Total process time):
      real time           1.42 seconds
      cpu time            0.06 seconds


51   data want;
52       set bank_lib.banking;
53       nwords=countw(columnB,' ');
54       do i=1 to nwords;
55           thisword=scan(columnB,i,' ');
56           contains_at_symbol=find(thisword,'@');
57           if contains_at_symbol&amp;gt;0 then do;           email_address=thisword;           output;        end;
58       end;
59       drop i nwords thisword;
60   run;

NOTE: There were 905 observations read from the data set BANK_LIB.BANKING.
NOTE: The data set WORK.WANT has 22 observations and 9 variables.
NOTE: DATA statement used (Total process time):
      real time           0.03 seconds
      cpu time            0.01 seconds


&lt;/PRE&gt;</description>
      <pubDate>Mon, 26 Jun 2023 20:53:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882544#M39148</guid>
      <dc:creator>SASUser_77</dc:creator>
      <dc:date>2023-06-26T20:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882555#M39149</link>
      <description>&lt;P&gt;Close your VIEWTABLE windows before rerunning your program. These are preventing you updating your SAS tables.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 22:47:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882555#M39149</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-06-26T22:47:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I search for a string of text with the "@" symbol? some cells contain email add</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882557#M39150</link>
      <description>&lt;P&gt;I closed my viewtables and re-ran the code, this time re-naming the output table too. It does not return only the email addresses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2023 01:30:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-do-I-search-for-a-string-of-text-with-the-quot-quot-symbol/m-p/882557#M39150</guid>
      <dc:creator>SASUser_77</dc:creator>
      <dc:date>2023-06-27T01:30:43Z</dc:date>
    </item>
  </channel>
</rss>

