<?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: How to do pattern check in SAS Visual Anaslytics in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-do-pattern-check-in-SAS-Visual-Anaslytics/m-p/854745#M16869</link>
    <description>Thanks acordes for the input it was exactly what I was looking to implemet. Have to add few more logic on top of it and it will be done. The reason I am trying to avoid in SAS Studio is that it is the only derived column and rest is a flat table hence wanted to avoid that extra layer and other orchasteration</description>
    <pubDate>Fri, 20 Jan 2023 06:30:28 GMT</pubDate>
    <dc:creator>anuragraishines</dc:creator>
    <dc:date>2023-01-20T06:30:28Z</dc:date>
    <item>
      <title>How to do pattern check in SAS Visual Anaslytics</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-do-pattern-check-in-SAS-Visual-Anaslytics/m-p/854286#M16848</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have one requirement where I have to identify a pattern in column and trim the column accordingly and it should be dynamic in nature.&lt;/P&gt;
&lt;P&gt;So the ask here is to remove all the characters, numbers and underscore from the last of the string till the eight digit numbers are removed. The length of string may vary but pattern remains same.So it will be something like this as below :-&lt;/P&gt;
&lt;P&gt;QH1234AGA3BARIALBA&lt;STRONG&gt;&lt;FONT color="#FF6600"&gt;12345678M_A&lt;/FONT&gt; &lt;/STRONG&gt;=&amp;gt;&amp;nbsp;QH1234AGA3BARIALBA&lt;/P&gt;
&lt;P&gt;QL4321AGARIC_ANNBC&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;87654321M_A&lt;/STRONG&gt; &lt;/FONT&gt;= &amp;gt;&amp;nbsp;QL4321AGARIC_ANNBC&lt;/P&gt;
&lt;P&gt;QL0000LAGRICCQQ_BC&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;99998888ABC_A&lt;/STRONG&gt; &lt;/FONT&gt;=&amp;gt;&amp;nbsp;QL0000LAGRICCQQ_BC&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So the highligted part will always have 8 digit number followed by characters which can be of any length than followed by _ (Underscore) and than character which can be of any length.&lt;/P&gt;
&lt;P&gt;So there is a pattern in string which I am able to achieve this through a sas perl function (prxchange('s/[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]*[A-Z]*_*[A-Z]//', -1, Col1)) but don't know how to achieve it in SAS VA.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Anurag&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 09:06:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-do-pattern-check-in-SAS-Visual-Anaslytics/m-p/854286#M16848</guid>
      <dc:creator>anuragraishines</dc:creator>
      <dc:date>2023-01-18T09:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to do pattern check in SAS Visual Anaslytics</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-do-pattern-check-in-SAS-Visual-Anaslytics/m-p/854453#M16854</link>
      <description>&lt;P&gt;Why don't you do this using PRXCHANGE when preparing your data prior to loading it into SAS VA? There's no problem running "normal" SAS code on a SAS VA platform as part of data preparation.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Jan 2023 21:21:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-do-pattern-check-in-SAS-Visual-Anaslytics/m-p/854453#M16854</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2023-01-18T21:21:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to do pattern check in SAS Visual Anaslytics</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-do-pattern-check-in-SAS-Visual-Anaslytics/m-p/854709#M16868</link>
      <description>&lt;P&gt;To fix this already in SAS Studio / prepare data is probably much better. You know the solution with the prx approach.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But you can achieve it in VA:&lt;/P&gt;
&lt;P&gt;Create a new calculated item and replace 'str' with your variable that holds the string.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Substring('str'n, 1, ( FindString('str'n, Reverse(Substring(
Reverse(RemoveChars(LowerCase('str'n),
'abcdefghijklmnopqrstuvwxyz_')), 1, 8))) - 1 ))&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Jan 2023 22:24:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-do-pattern-check-in-SAS-Visual-Anaslytics/m-p/854709#M16868</guid>
      <dc:creator>acordes</dc:creator>
      <dc:date>2023-01-19T22:24:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to do pattern check in SAS Visual Anaslytics</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-do-pattern-check-in-SAS-Visual-Anaslytics/m-p/854745#M16869</link>
      <description>Thanks acordes for the input it was exactly what I was looking to implemet. Have to add few more logic on top of it and it will be done. The reason I am trying to avoid in SAS Studio is that it is the only derived column and rest is a flat table hence wanted to avoid that extra layer and other orchasteration</description>
      <pubDate>Fri, 20 Jan 2023 06:30:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-to-do-pattern-check-in-SAS-Visual-Anaslytics/m-p/854745#M16869</guid>
      <dc:creator>anuragraishines</dc:creator>
      <dc:date>2023-01-20T06:30:28Z</dc:date>
    </item>
  </channel>
</rss>

