<?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 How to up case only first letter and last letter of a word? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-up-case-only-first-letter-and-last-letter-of-a-word/m-p/272151#M54134</link>
    <description />
    <pubDate>Fri, 20 May 2016 20:44:49 GMT</pubDate>
    <dc:creator>AshokaJayaram</dc:creator>
    <dc:date>2016-05-20T20:44:49Z</dc:date>
    <item>
      <title>How to up case only first letter and last letter of a word?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-up-case-only-first-letter-and-last-letter-of-a-word/m-p/272151#M54134</link>
      <description />
      <pubDate>Fri, 20 May 2016 20:44:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-up-case-only-first-letter-and-last-letter-of-a-word/m-p/272151#M54134</guid>
      <dc:creator>AshokaJayaram</dc:creator>
      <dc:date>2016-05-20T20:44:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to up case only first letter and last letter of a word?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-up-case-only-first-letter-and-last-letter-of-a-word/m-p/272183#M54138</link>
      <description>&lt;P&gt;You can cobble together some string functions, primarily, SUBSTR(), PROPCASE() and UPCASE(). &amp;nbsp;&lt;/P&gt;
&lt;P&gt;This would be a brute force method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
input word $;
word2 = catt(propcase(substr(word, 1, length(word)-1)), 
			upcase(substr(word, length(word), 1)));
cards;
word
random
mIxed
CASE
WORDS
;
run;

proc print;run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 May 2016 21:24:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-up-case-only-first-letter-and-last-letter-of-a-word/m-p/272183#M54138</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-05-20T21:24:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to up case only first letter and last letter of a word?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-up-case-only-first-letter-and-last-letter-of-a-word/m-p/272189#M54139</link>
      <description>&lt;P&gt;Is your actual data going to contain any spaces imbedded?&lt;/P&gt;</description>
      <pubDate>Fri, 20 May 2016 21:45:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-up-case-only-first-letter-and-last-letter-of-a-word/m-p/272189#M54139</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-20T21:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to up case only first letter and last letter of a word?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-up-case-only-first-letter-and-last-letter-of-a-word/m-p/272209#M54151</link>
      <description>&lt;P&gt;Or harness the power of regular expressions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
length str $40;
input str &amp;amp;;
cards;
word
random
mIxed
CASE
WORDS
Whole string of words.
a ab abc abc-def
;

data want;
if not prx1 then prx1 + prxParse("s/\b(\w?)(\w*)(\w)\b/\u\1\L\2\E\u\3/");
set have;
length StrinG $40;
StrinG = prxChange(prx1, -1, str);
drop prx1;
run;

proc sql; select * from want; quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 May 2016 02:35:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-up-case-only-first-letter-and-last-letter-of-a-word/m-p/272209#M54151</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2016-05-21T02:35:47Z</dc:date>
    </item>
  </channel>
</rss>

