<?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: Counting words embedded in quotes in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Counting-words-embedded-in-quotes/m-p/523995#M142442</link>
    <description>Thank you , not sure how i missed this "q" Modifier.</description>
    <pubDate>Tue, 01 Jan 2019 12:55:03 GMT</pubDate>
    <dc:creator>keen_sas</dc:creator>
    <dc:date>2019-01-01T12:55:03Z</dc:date>
    <item>
      <title>Counting words embedded in quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-words-embedded-in-quotes/m-p/523992#M142439</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is the sample text and the count of words as result in COUNT column . When using COUNTW function the default delimiter is space , it is applicable for first row , when using the same COUNTW with space as delimiter it is counting Prime minister as two different words , though it is single word. Tried with multiple delimiters and modifiers in COUNTW function , but still could not get the desired result. Can anyone suggest how to count the words in double quotes as single word, even though if there are multiple words present in those quotes or even empty quotes should also be counted as one word.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE width="885"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;S.no&lt;/TD&gt;
&lt;TD width="547"&gt;TEXT&lt;/TD&gt;
&lt;TD width="274"&gt;COUNT&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;"Minister" "governor" "President"&lt;/TD&gt;
&lt;TD&gt;3 words are present&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;"Chief Minister" "Prime Minister" "Cabinet Minister\Defence Secretary" "General" ""&lt;/TD&gt;
&lt;TD width="274"&gt;5 words are present including the last empty double quotes&amp;nbsp;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Tue, 01 Jan 2019 11:16:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-words-embedded-in-quotes/m-p/523992#M142439</guid>
      <dc:creator>keen_sas</dc:creator>
      <dc:date>2019-01-01T11:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Counting words embedded in quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-words-embedded-in-quotes/m-p/523994#M142441</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
name='"Minister" "governor" "President"                                                     ';
n=countw(name,' ','q');
output;

name='"Chief Minister" "Prime Minister" "Cabinet Minister\Defence Secretary" "General" "" ';
n=countw(name,' ','q');
output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 01 Jan 2019 12:00:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-words-embedded-in-quotes/m-p/523994#M142441</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-01-01T12:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Counting words embedded in quotes</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-words-embedded-in-quotes/m-p/523995#M142442</link>
      <description>Thank you , not sure how i missed this "q" Modifier.</description>
      <pubDate>Tue, 01 Jan 2019 12:55:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-words-embedded-in-quotes/m-p/523995#M142442</guid>
      <dc:creator>keen_sas</dc:creator>
      <dc:date>2019-01-01T12:55:03Z</dc:date>
    </item>
  </channel>
</rss>

