<?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: Perl expression in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/465066#M118598</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   x = 'MCLAUREN';
   y = prxchange("s/^(MC)/\u\L$1/i", 1, x);
   put y=;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 25 May 2018 14:01:03 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2018-05-25T14:01:03Z</dc:date>
    <item>
      <title>Perl expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/464764#M118507</link>
      <description>&lt;DIV id="initializing_button_error" style="cursor: default !important; position: relative !important; background-repeat: no-repeat; width: 670px !important; height: 50px !important; z-index: 999999 !important; font: 11px arial !important; text-align: right !important; color: white !important; display: none;" title="PasswordBank WebSSO Wizard"&gt;&lt;IMG style="cursor: default !important; position: relative !important; background-repeat: no-repeat; width: 670px !important; height: 50px !important; z-index: 999999 !important;" src="chrome://pbk/content/blackbar_original_2_loadconfig_error.png" border="0" /&gt;&lt;/DIV&gt;
&lt;DIV id="initializing_button" style="cursor: default !important; position: relative !important; background-repeat: no-repeat; width: 670px !important; height: 50px !important; z-index: 999999 !important; font: 11px arial !important; text-align: right !important; color: white !important; display: none;" title="PasswordBank WebSSO Wizard"&gt;&lt;IMG style="cursor: default !important; position: relative !important; background-repeat: no-repeat; width: 670px !important; height: 50px !important; z-index: 999999 !important;" src="chrome://pbk/content/blackbar_original_2_loadconfig.png" border="0" /&gt;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;Hello ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help to change "MCLAUREN" value as "McLAUREN"&amp;nbsp; by using Perl Expression (PRXCHANGE)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried below code but didn't work for me&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data _null_;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; x = 'MCLAUREN';&lt;BR /&gt;&amp;nbsp;&amp;nbsp; y = prxchange("s/ (MC) /\u\L$1/i", -1, x);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; put y=;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in Advance&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 14:08:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/464764#M118507</guid>
      <dc:creator>RajasekharReddy</dc:creator>
      <dc:date>2018-05-24T14:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: Perl expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/464797#M118527</link>
      <description>&lt;P&gt;Look at the example on Page 9 of this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www2.sas.com/proceedings/forum2007/223-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/223-2007.pdf&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you want to set your regular expression first like&lt;/P&gt;
&lt;P&gt;re = prxparse('&lt;SPAN&gt;s/ (MC) /\u\L$1/i&lt;/SPAN&gt;');&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and then call it like they do&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;cleanname= prxchange( re, 1, oldname);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 15:05:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/464797#M118527</guid>
      <dc:creator>HB</dc:creator>
      <dc:date>2018-05-24T15:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Perl expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/464918#M118551</link>
      <description>&lt;P&gt;something like this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   x = 'MCLAUREN';
   y = prxchange("s/^(MC)(.+)/Mc$2/i", -1, x);
   put y=;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 May 2018 23:17:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/464918#M118551</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2018-05-24T23:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Perl expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/464929#M118557</link>
      <description>or something like prxchange("s/^MC(.+)/Mc$1/", -1, x), since "Mc" is typed in manually so it is unnecessary to catch "MC".</description>
      <pubDate>Fri, 25 May 2018 01:13:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/464929#M118557</guid>
      <dc:creator>jim_cai</dc:creator>
      <dc:date>2018-05-25T01:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Perl expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/464930#M118558</link>
      <description>&lt;P&gt;Or like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   x = 'pEter MClAUREN &amp;amp; ian macIllIoMChadha';
   y = prxchange("s/\b(MC|MAC)(\w)/\1\u\2/i", -1, propcase(x));
   put y=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;y=Peter McLauren &amp;amp; Ian MacIlliomchadha&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 May 2018 01:44:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/464930#M118558</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2018-05-25T01:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Perl expression</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/465066#M118598</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   x = 'MCLAUREN';
   y = prxchange("s/^(MC)/\u\L$1/i", 1, x);
   put y=;
run;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 25 May 2018 14:01:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Perl-expression/m-p/465066#M118598</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-05-25T14:01:03Z</dc:date>
    </item>
  </channel>
</rss>

