<?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 Extract character from string (scan automatisation) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Extract-character-from-string-scan-automatisation/m-p/390637#M277635</link>
    <description>&lt;P&gt;Hellow friends,&lt;/P&gt;&lt;P&gt;&lt;U&gt;data&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;length usercation $ 200;&lt;BR /&gt;input &lt;SPAN&gt;u&lt;/SPAN&gt;&lt;SPAN&gt;sercation &lt;/SPAN&gt;$ ;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;PDF_STUDY_11225_15/12/2016&lt;BR /&gt;PDF_45896_12/05/2017_HTT&lt;BR /&gt;PDF_STUDY_CURVE&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a new variable which contains just the first carcaterial part of the variable usercation before the '_' &amp;nbsp;&lt;/P&gt;&lt;P&gt;for example:&amp;nbsp;&lt;SPAN&gt;PDF_STUDY_11225_15/12/2016 -&amp;gt;PDF_STUDY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PDF_45896_12/05/2017_HTT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt;PDF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PDF_STUDY_CURVE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;gt;&amp;nbsp;PDF_STUDY_CURVE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In fact I would like automated processing for many lines.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much for your help!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 24 Aug 2017 14:55:11 GMT</pubDate>
    <dc:creator>PRG_ZF</dc:creator>
    <dc:date>2017-08-24T14:55:11Z</dc:date>
    <item>
      <title>Extract character from string (scan automatisation)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-character-from-string-scan-automatisation/m-p/390637#M277635</link>
      <description>&lt;P&gt;Hellow friends,&lt;/P&gt;&lt;P&gt;&lt;U&gt;data&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data test;&lt;BR /&gt;length usercation $ 200;&lt;BR /&gt;input &lt;SPAN&gt;u&lt;/SPAN&gt;&lt;SPAN&gt;sercation &lt;/SPAN&gt;$ ;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;PDF_STUDY_11225_15/12/2016&lt;BR /&gt;PDF_45896_12/05/2017_HTT&lt;BR /&gt;PDF_STUDY_CURVE&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to create a new variable which contains just the first carcaterial part of the variable usercation before the '_' &amp;nbsp;&lt;/P&gt;&lt;P&gt;for example:&amp;nbsp;&lt;SPAN&gt;PDF_STUDY_11225_15/12/2016 -&amp;gt;PDF_STUDY&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; PDF_45896_12/05/2017_HTT&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;-&amp;gt;PDF&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PDF_STUDY_CURVE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&amp;gt;&amp;nbsp;PDF_STUDY_CURVE&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In fact I would like automated processing for many lines.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much for your help!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 14:55:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-character-from-string-scan-automatisation/m-p/390637#M277635</guid>
      <dc:creator>PRG_ZF</dc:creator>
      <dc:date>2017-08-24T14:55:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extract character from string (scan automatisation)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-character-from-string-scan-automatisation/m-p/390645#M277636</link>
      <description>&lt;P&gt;Please try&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
length usercation $ 200;
input usercation $ ;

cards;

PDF_STUDY_11225_15/12/2016
PDF_45896_12/05/2017_HTT
PDF_STUDY_CURVE
;
run;

data want;
set test;
if prxmatch('/_\d/',usercation)&amp;gt;0 then new=substr(usercation,1,prxmatch('/_\d/',usercation));
else new=usercation;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 Aug 2017 15:15:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-character-from-string-scan-automatisation/m-p/390645#M277636</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2017-08-24T15:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extract character from string (scan automatisation)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-character-from-string-scan-automatisation/m-p/390650#M277637</link>
      <description>&lt;P&gt;Minor correction to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12151"&gt;@Jagadishkatam&lt;/a&gt;'s suggested code:&lt;/P&gt;
&lt;PRE&gt;data want;
  set test;
  if prxmatch('/_\d/',usercation)&amp;gt;0 then new=substr(usercation,1,prxmatch('/_\d/',usercation)-1);
  else new=usercation;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 15:27:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-character-from-string-scan-automatisation/m-p/390650#M277637</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-08-24T15:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Extract character from string (scan automatisation)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-character-from-string-scan-automatisation/m-p/390652#M277638</link>
      <description>&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;P&gt;it works very well!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 15:30:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-character-from-string-scan-automatisation/m-p/390652#M277638</guid>
      <dc:creator>PRG_ZF</dc:creator>
      <dc:date>2017-08-24T15:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Extract character from string (scan automatisation)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-character-from-string-scan-automatisation/m-p/390653#M277639</link>
      <description>&lt;P&gt;Thank you very much for correction!&lt;/P&gt;&lt;P&gt;it works very well!&lt;/P&gt;</description>
      <pubDate>Thu, 24 Aug 2017 15:31:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-character-from-string-scan-automatisation/m-p/390653#M277639</guid>
      <dc:creator>PRG_ZF</dc:creator>
      <dc:date>2017-08-24T15:31:29Z</dc:date>
    </item>
  </channel>
</rss>

