<?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 Extracting words from a string after a specific character in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614461#M179631</link>
    <description>&lt;P&gt;Hello SAS experts,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a string of characters that I need everything before '.csv' and I fail to get the whole thing&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is literally how they are naming the files and the file names can not be changed...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Valdoste T.C. 8-19.csv&amp;nbsp;&lt;/P&gt;&lt;P&gt;Valdoste T.C Nov 2019.csv&lt;/P&gt;&lt;P&gt;Valdoste T.C. Sept 2019.csv&lt;/P&gt;&lt;P&gt;Valdoste T.C. December 2018.csv&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I keep changing to '.' and '-' and&amp;nbsp; to the 1,2,3 word but nothing is working.&amp;nbsp; I new to sas so what seems like an easy fix has me going round and round.&amp;nbsp; please assist.&amp;nbsp;&lt;/P&gt;&lt;P&gt;code&amp;nbsp;&lt;/P&gt;&lt;P&gt;data dirlist3 ;&lt;BR /&gt;set want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Sheetname1=scan(name,2,'-');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
    <pubDate>Mon, 30 Dec 2019 21:34:33 GMT</pubDate>
    <dc:creator>lisa2002</dc:creator>
    <dc:date>2019-12-30T21:34:33Z</dc:date>
    <item>
      <title>Extracting words from a string after a specific character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614461#M179631</link>
      <description>&lt;P&gt;Hello SAS experts,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a string of characters that I need everything before '.csv' and I fail to get the whole thing&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this is literally how they are naming the files and the file names can not be changed...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Valdoste T.C. 8-19.csv&amp;nbsp;&lt;/P&gt;&lt;P&gt;Valdoste T.C Nov 2019.csv&lt;/P&gt;&lt;P&gt;Valdoste T.C. Sept 2019.csv&lt;/P&gt;&lt;P&gt;Valdoste T.C. December 2018.csv&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I keep changing to '.' and '-' and&amp;nbsp; to the 1,2,3 word but nothing is working.&amp;nbsp; I new to sas so what seems like an easy fix has me going round and round.&amp;nbsp; please assist.&amp;nbsp;&lt;/P&gt;&lt;P&gt;code&amp;nbsp;&lt;/P&gt;&lt;P&gt;data dirlist3 ;&lt;BR /&gt;set want;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Sheetname1=scan(name,2,'-');&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2019 21:34:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614461#M179631</guid>
      <dc:creator>lisa2002</dc:creator>
      <dc:date>2019-12-30T21:34:33Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting words from a string after a specific character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614462#M179632</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Sheetname1=tranwrd(name,'.csv','');&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Dec 2019 21:59:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614462#M179632</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-12-30T21:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting words from a string after a specific character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614463#M179633</link>
      <description>&lt;P&gt;Try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;want=substr(str,1,find(str,'.csv','i')-1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Dec 2019 21:41:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614463#M179633</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-12-30T21:41:34Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting words from a string after a specific character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614483#M179635</link>
      <description>&lt;P&gt;If they all end in ".csv", then replace the last 4 characters with '' (null).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	length name $50.;
	name = 'Valdoste T.C. 8-19.csv';
	output;
	name = 'Valdoste T.C Nov 2019.csv';
	output;
	name = 'Valdoste T.C. Sept 2019.csv';
	output;
	name = 'Valdoste T.C. December 2018.csv';
	output;
run;

data want;
	set have;
	substr(name,length(name)-3,4)='';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Dec 2019 22:21:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614483#M179635</guid>
      <dc:creator>unison</dc:creator>
      <dc:date>2019-12-30T22:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting words from a string after a specific character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614486#M179636</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/270457"&gt;@unison&lt;/a&gt;&amp;nbsp; You know what, At 5:36 PM my eyes are red and damn tired and I wanna get a can of beer, go home and crash. That simplicity in your solution has alerted me to go home and crash. Well thought out. Kudos!&lt;/P&gt;</description>
      <pubDate>Mon, 30 Dec 2019 22:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614486#M179636</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-12-30T22:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Extracting words from a string after a specific character</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614527#M179662</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Sheetname1=prxchange('s/\.csv//', 1, name);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 31 Dec 2019 08:08:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extracting-words-from-a-string-after-a-specific-character/m-p/614527#M179662</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2019-12-31T08:08:25Z</dc:date>
    </item>
  </channel>
</rss>

