<?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: Working on functions- to insert _ for every letter in a word in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Working-on-functions-to-insert-for-every-letter-in-a-word/m-p/785980#M250888</link>
    <description>&lt;P&gt;Looks like homework, what have you tried so far?&lt;/P&gt;
&lt;P&gt;Your wanted output does not match the description, there is no underscore after the final A.&lt;/P&gt;
&lt;P&gt;If this is type, using a regular expression is my first choice.&lt;/P&gt;</description>
    <pubDate>Tue, 14 Dec 2021 11:53:46 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2021-12-14T11:53:46Z</dc:date>
    <item>
      <title>Working on functions- to insert _ for every letter in a word</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Working-on-functions-to-insert-for-every-letter-in-a-word/m-p/785965#M250884</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kindly help me with this task.&lt;/P&gt;&lt;P&gt;I do have a variable with value 'GLOBAL INDIA'&lt;/P&gt;&lt;P&gt;Here, I want to insert '_' for every letter&lt;/P&gt;&lt;P&gt;Output I need: G_L_O_B_A_L&amp;nbsp; I_N_D_I_A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 11:25:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Working-on-functions-to-insert-for-every-letter-in-a-word/m-p/785965#M250884</guid>
      <dc:creator>meena_gowtham</dc:creator>
      <dc:date>2021-12-14T11:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Working on functions- to insert _ for every letter in a word</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Working-on-functions-to-insert-for-every-letter-in-a-word/m-p/785976#M250887</link>
      <description>&lt;P&gt;Strange requirement. Below will work as long as you are not dealing with characters that use more than one byte (because the SAS RegEx functions are not - yet? - built for this).&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
  var='GLOBAL INDIA';

  /* define length for new variable doubled the source variable */
  if 0 then var_new=var||var;

  var_new=prxchange('s/([^ ])(?!\b)/$1_/oi',-1,strip(var));
run;&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 11:48:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Working-on-functions-to-insert-for-every-letter-in-a-word/m-p/785976#M250887</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-12-14T11:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Working on functions- to insert _ for every letter in a word</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Working-on-functions-to-insert-for-every-letter-in-a-word/m-p/785980#M250888</link>
      <description>&lt;P&gt;Looks like homework, what have you tried so far?&lt;/P&gt;
&lt;P&gt;Your wanted output does not match the description, there is no underscore after the final A.&lt;/P&gt;
&lt;P&gt;If this is type, using a regular expression is my first choice.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Dec 2021 11:53:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Working-on-functions-to-insert-for-every-letter-in-a-word/m-p/785980#M250888</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2021-12-14T11:53:46Z</dc:date>
    </item>
    <item>
      <title>Re: Working on functions- to insert _ for every letter in a word</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Working-on-functions-to-insert-for-every-letter-in-a-word/m-p/785985#M250890</link>
      <description>data test;&lt;BR /&gt;  var='GLOBAL INDIA';&lt;BR /&gt;&lt;BR /&gt;  var_new=prxchange('s/(\w)(?=\w)/$1_/o',-1,strip(var));&lt;BR /&gt;run;</description>
      <pubDate>Tue, 14 Dec 2021 12:15:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Working-on-functions-to-insert-for-every-letter-in-a-word/m-p/785985#M250890</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-12-14T12:15:59Z</dc:date>
    </item>
  </channel>
</rss>

