<?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: Checking several conditions at once in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196659#M49173</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's fair Haikuo. Thanks so much for explanation. You are right, I should try to figure out myself more as it will help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Apr 2015 17:43:13 GMT</pubDate>
    <dc:creator>devsas</dc:creator>
    <dc:date>2015-04-17T17:43:13Z</dc:date>
    <item>
      <title>Checking several conditions at once</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196649#M49163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;Thx in advance for your help. So, I'm trying to find those records in a dataset which dont meet certain conditions for the variable HIC numbers. I can perhaps solve each condition using different functions, but iam hoping to have one code to get any cases which dont satisfy any of the criteria. Here are the conditions:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;"If the HIC Number begins with a number, the first 9 positions must be numeric and&lt;BR /&gt;end with a letter, double letter or letter-integer combination. If the HIC&lt;BR /&gt;Number begins with a letter prefix (from 1-3 characters), the number itself has&lt;BR /&gt;either 6 or 9 digits"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;For example, following values are valid: 777777888A, 777777888AB, 777777888A8, A888888888, AAA666666&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Thanks so much!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 16:18:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196649#M49163</guid>
      <dc:creator>devsas</dc:creator>
      <dc:date>2015-04-15T16:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Checking several conditions at once</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196650#M49164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not rigorously tested:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;infile&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;dsd&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; str :&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;$20.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;flag=prxmatch(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'/^\d{9,}\w*([a-z]{1,2}$|[a-z]\d)|^[a-z]{1,3}(\d{6}|\d{9})$/io'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;, strip(str))&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt; 777777888A, 777777888AB, 777777888A8, A888888888, AAA666666, adsklf2903475&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;quit&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 19:46:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196650#M49164</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-04-15T19:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Checking several conditions at once</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196651#M49165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! If the dataset name is test and the variable where iam trying to test this condition is HICN, how will your code look like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 21:01:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196651#M49165</guid>
      <dc:creator>devsas</dc:creator>
      <dc:date>2015-04-15T21:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: Checking several conditions at once</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196652#M49166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; want;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&lt;STRONG&gt; test&lt;/STRONG&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;flag=prxmatch(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'/^\d{9,}\w*([a-z]{1,2}$|[a-z]\d)|^[a-z]{1,3}(\d{6}|\d{9})$/io'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;, strip(&lt;STRONG&gt;HICN&lt;/STRONG&gt;))&amp;gt;&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;0&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;let us know how it goes, this code has not been thoroughly tested. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 21:08:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196652#M49166</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-04-15T21:08:39Z</dc:date>
    </item>
    <item>
      <title>Re: Checking several conditions at once</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196653#M49167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks again! Well, I ran it but it didnt flag '372175864' although it violates the condition '&lt;/P&gt;&lt;P&gt;If the HIC Number begins with a number, the first 9 positions must be numeric and&lt;/P&gt;&lt;P&gt;end with a letter' as the last character is not a letter.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 21:33:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196653#M49167</guid>
      <dc:creator>devsas</dc:creator>
      <dc:date>2015-04-15T21:33:57Z</dc:date>
    </item>
    <item>
      <title>Re: Checking several conditions at once</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196654#M49168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure what happened on your end, but it seems working for me in the test data:&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;infile&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt; &lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;dsd&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; str :&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;$20.&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; @@;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;flag=prxmatch(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'/^\d{9,}\w*([a-z]{1,2}|[a-z]\d)$|^[a-z]{1,3}(\d{6}|\d{9})$/io'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;, strip(str))&amp;gt;&lt;/SPAN&gt;&lt;SPAN style="color: teal; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;777777888A, 777777888AB, 777777888A8, A888888888, AAA666666, adsklf2903475, 372175864&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: navy; background: white; font-family: 'Courier New';"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;The ones not meeting the criteria are flagged 0.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;&lt;IMG __jive_id="10049" alt="20150414.PNG" class="jive-image" src="https://communities.sas.com/legacyfs/online/10049_20150414.PNG" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Apr 2015 23:10:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196654#M49168</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-04-15T23:10:11Z</dc:date>
    </item>
    <item>
      <title>Re: Checking several conditions at once</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196655#M49169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you sir, yes it works now. My bad, I was spelling variable incorrectly.&amp;nbsp; I see that you have used prxmatch function here, im not sure if i understand it correctly. Can you point towards any source where I can learn this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 14:31:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196655#M49169</guid>
      <dc:creator>devsas</dc:creator>
      <dc:date>2015-04-16T14:31:46Z</dc:date>
    </item>
    <item>
      <title>Re: Checking several conditions at once</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196656#M49170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Google "Perl Regular Expression SAS", at least that was how I started. You will hit many SAS papers as well as SAS online help Docs. Or like some of SAS users I know, they started with Perl Black book.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 14:42:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196656#M49170</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-04-16T14:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Checking several conditions at once</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196657#M49171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you again, Hai! I didnt know much about Perl before this discussion, but iam glad you answered it.&amp;nbsp; Because now i see that its such an efficient way to solve these kind of issues. I'm trying to learn after your post, but still struggling with some concepts. When you have little time, can you please break down in words the expression you used to flag those cases and also different symbols you used and their significance? Also, I have similar problems and was wondering if you can help in those too. Perhaps that will help me eventually getting the gist of these concepts. I looked at the cheat sheet of SAS/perl but still not fully getting it. Here are the other conditions. If you can break down these conditions individually that would be perfect. I mean flag1, flag2 etc&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Admit Date&lt;/STRONG&gt;&lt;BR /&gt;– The beginning date of the service must only be in the format m/d/yyyy. Must not be a&lt;BR /&gt;future date. The admit date must be prior to or equal to the discharge date.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;STRONG style="text-decoration: underline;"&gt;Dx01&lt;/STRONG&gt; –&amp;nbsp; Must not be missing/Null and be between 3-5 characters (all digits or beginning with one letter).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG style="text-decoration: underline;"&gt;NPI&lt;/STRONG&gt; – The NPI of the rendering or billing provider. Must not be missing/Null and be 10 digits.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;STRONG style="text-decoration: underline;"&gt;Bill Type &lt;/STRONG&gt;– POSSIBLE Values ARE ‘P’ for professional, ‘I’ for inpatient or ‘O’ for outpatient. This&lt;BR /&gt;field must not be missing/Null.&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; mso-bidi-font-family: 'Times New Roman'; mso-fareast-language: EN-US; mso-bidi-language: AR-SA; mso-ascii-theme-font: minor-latin; line-height: 115%; font-size: 11pt; mso-hansi-theme-font: minor-latin; mso-ansi-language: EN-US; font-family: 'Calibri','sans-serif'; mso-fareast-theme-font: minor-latin; text-decoration: underline; mso-fareast-font-family: Calibri; mso-bidi-theme-font: minor-bidi;"&gt;Risk Assessment Code&lt;/STRONG&gt;&lt;SPAN style="line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt; – &lt;SPAN style="text-decoration: underline;"&gt;May be missing/Null for 2013 dates of&lt;BR /&gt;service&lt;/SPAN&gt;. If a value is present for 2013 dates of service, it should be&lt;BR /&gt;value ‘A’. It is required (must not be missing/Null) for 2014 dates of service&lt;BR /&gt;onward. Only possible values are A, B or C.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 115%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;Thanks so much!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 13:37:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196657#M49171</guid>
      <dc:creator>devsas</dc:creator>
      <dc:date>2015-04-17T13:37:11Z</dc:date>
    </item>
    <item>
      <title>Re: Checking several conditions at once</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196658#M49172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="812685" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will be frank with you. The key to PRX functions (and any other programming language) is practice, practice and more practice, there is no Genie to build a Rome for you overnight. I will try to break down part of my code in a hope to facilitate your understanding, but ultimately it sits upon your shoulder.&lt;/P&gt;&lt;P&gt;('/^\d{9,}\w*([a-z]{1,2}$|[a-z]\d)|^[a-z]{1,3}(\d{6}|\d{9})$/io', strip(str))&lt;/P&gt;&lt;P&gt;1. ' ': Usually PRX is searching for a text string, so if you are searching an expression (variable), you may not need this quote.&lt;/P&gt;&lt;P&gt;2. /&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /io: the contents in between forward slash are the contents you are searching. io: i to let you ignore cases of alphabetic letters (A=a), o to let SAS only compile once for the same content to save resources.&lt;/P&gt;&lt;P&gt;3. ^: is the beginning of the your string. so ^123 will match 123, but not 0123.&lt;/P&gt;&lt;P&gt;4. \d: is digits (0-9).&lt;/P&gt;&lt;P&gt;5. \d{9,}: at least 9 digits.&lt;/P&gt;&lt;P&gt;6.\w*: zero or more word characters.&lt;/P&gt;&lt;P&gt;7. (&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; is the selective grouping, either the part before pipe '|' or after will enter the search.&lt;/P&gt;&lt;P&gt;8. [a-z]: any one of alphabetic letters, and because of the o options explained in above 2, case is ignored.&lt;/P&gt;&lt;P&gt;9. [a-z]{1,2}: at least one letter, but no more than 2 letters.&lt;/P&gt;&lt;P&gt;10. $: the end of the string. So ABC$ will match OKABC, but not OKABCD.&lt;/P&gt;&lt;P&gt;11. [a-z]\d: any one of alphabetic letters plus any one digits. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The rest of the code is just repeating the same concepts while following your business requirements. During this process, it actually helped me to identify one glitch in my original code. I have it fixed in the original post, but not in this one. Challenge yourself to find it, and to figure out why.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 14:29:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196658#M49172</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2015-04-17T14:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Checking several conditions at once</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196659#M49173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's fair Haikuo. Thanks so much for explanation. You are right, I should try to figure out myself more as it will help. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 17:43:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Checking-several-conditions-at-once/m-p/196659#M49173</guid>
      <dc:creator>devsas</dc:creator>
      <dc:date>2015-04-17T17:43:13Z</dc:date>
    </item>
  </channel>
</rss>

