<?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: Is there a SAS function to determine a string ends with another string? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691405#M210430</link>
    <description>Or if you know it's a design limitation, you can design your processes to be prefix heavy rather than suffix.</description>
    <pubDate>Tue, 13 Oct 2020 20:55:52 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2020-10-13T20:55:52Z</dc:date>
    <item>
      <title>Is there a SAS function to determine a string ends with another string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691343#M210397</link>
      <description>&lt;P&gt;We can use "=:" to determine whether aString starts with 'ABC' like below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if aString=:'ABC';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But how to determine aString ends with 'ABC'? Is there an existing function or operator for that? Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 17:14:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691343#M210397</guid>
      <dc:creator>jjjch</dc:creator>
      <dc:date>2020-10-13T17:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a SAS function to determine a string ends with another string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691344#M210398</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
 str='jojojoiABC';
 output;
 str='iknmmoabc';
 output;
 str='knhjknl';
 output;
run;

data want;
 set have;
 if prxmatch('/.*abc$/i',strip(str));
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Oct 2020 17:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691344#M210398</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-10-13T17:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a SAS function to determine a string ends with another string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691349#M210403</link>
      <description>REVERSE() everything?&lt;BR /&gt;&lt;BR /&gt;if reverse(aString) =: reverse(ABC)?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Oct 2020 17:31:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691349#M210403</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-10-13T17:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a SAS function to determine a string ends with another string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691352#M210405</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data have;
 str='jojojoiABC';
 output;
 str='iknmmoabc';
 output;
 str='knhjknl';
 output;
run;

data want;
 set have;
 if UPCASE(substr(strip(str),length(strip(str))-2))='ABC';
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 13 Oct 2020 17:40:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691352#M210405</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2020-10-13T17:40:55Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a SAS function to determine a string ends with another string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691358#M210411</link>
      <description>Thank you, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt;</description>
      <pubDate>Tue, 13 Oct 2020 18:13:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691358#M210411</guid>
      <dc:creator>jjjch</dc:creator>
      <dc:date>2020-10-13T18:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a SAS function to determine a string ends with another string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691360#M210412</link>
      <description>Thank you, Reeza. Your solution also works. I just hope SAS can provide a string function or operator for endswith().</description>
      <pubDate>Tue, 13 Oct 2020 18:15:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691360#M210412</guid>
      <dc:creator>jjjch</dc:creator>
      <dc:date>2020-10-13T18:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a SAS function to determine a string ends with another string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691362#M210414</link>
      <description>&lt;P&gt;In a WHERE condition you could also use the &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=lrcon&amp;amp;docsetTarget=p0eaz2e63dlj17n1i5z17z3h84vp.htm&amp;amp;locale=en#p0dw9c7qs4zqnyn1xub81o4d2v7i" target="_self"&gt;LIKE operator&lt;/A&gt;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;where aString like '%ABC';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Oct 2020 18:27:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691362#M210414</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2020-10-13T18:27:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a SAS function to determine a string ends with another string?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691405#M210430</link>
      <description>Or if you know it's a design limitation, you can design your processes to be prefix heavy rather than suffix.</description>
      <pubDate>Tue, 13 Oct 2020 20:55:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Is-there-a-SAS-function-to-determine-a-string-ends-with-another/m-p/691405#M210430</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-10-13T20:55:52Z</dc:date>
    </item>
  </channel>
</rss>

