<?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 string operation in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/string-operation/m-p/101706#M28563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;How to use string function to find&amp;nbsp; the first none 'x' letter?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;value='xxasdxfg';output;&lt;/P&gt;&lt;P&gt;value='xxxxqwerxxt';output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data need;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;asdxfg&lt;/P&gt;&lt;P&gt;qwerxxt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;how to use string function keep the last N digit?&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;x='123456789';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;x2=substr(x,-4); /*I need x2=6789,the last four digits of x*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Jul 2012 21:07:26 GMT</pubDate>
    <dc:creator>Mike_Davis</dc:creator>
    <dc:date>2012-07-06T21:07:26Z</dc:date>
    <item>
      <title>string operation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/string-operation/m-p/101706#M28563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two questions:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;1.&lt;/P&gt;&lt;P&gt;How to use string function to find&amp;nbsp; the first none 'x' letter?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;value='xxasdxfg';output;&lt;/P&gt;&lt;P&gt;value='xxxxqwerxxt';output;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data need;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;asdxfg&lt;/P&gt;&lt;P&gt;qwerxxt&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&lt;/P&gt;&lt;P&gt;how to use string function keep the last N digit?&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;x='123456789';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;x2=substr(x,-4); /*I need x2=6789,the last four digits of x*/&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 21:07:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/string-operation/m-p/101706#M28563</guid>
      <dc:creator>Mike_Davis</dc:creator>
      <dc:date>2012-07-06T21:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: string operation</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/string-operation/m-p/101707#M28564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;data have;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;value='xxasdxfg';output;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;value='xxxxqwerxxt';output;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;data want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;set have;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;new = substr(value,verify(value,'x'));&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;data have;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x = '123456789';&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;data want;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;set have;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;x2 = substr(x,length(x)-3);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'courier new', courier;"&gt;run;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 21:20:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/string-operation/m-p/101707#M28564</guid>
      <dc:creator>MikeZdeb</dc:creator>
      <dc:date>2012-07-06T21:20:07Z</dc:date>
    </item>
  </channel>
</rss>

