<?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: Substring/Scan from string in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166141#M43050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Backward Match for Peal Regular Expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data&amp;nbsp; have;&lt;/P&gt;&lt;P&gt;input string $40.;&lt;/P&gt;&lt;P&gt;re = prxparse('/((?&amp;lt;=BOB_TS=)\d{10})/io');&lt;/P&gt;&lt;P&gt;if prxmatch(re,string) then want= prxposn(re,1,string);&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;33_we#fff23BOB_TS=234623623624756_TOO&lt;/P&gt;&lt;P&gt;BOB_TS=57335623566654756BO&lt;/P&gt;&lt;P&gt;60pBOB_TS=343467364563423TOp_#&lt;/P&gt;&lt;P&gt;WWBOB_TS=2346752665634cc90&lt;/P&gt;&lt;P&gt;9789BOB_TS=9872363566756Alll&lt;/P&gt;&lt;P&gt;ldldBOB_TS=2340235674025634efrwe&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 May 2014 13:50:07 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2014-05-20T13:50:07Z</dc:date>
    <item>
      <title>Substring/Scan from string</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166137#M43046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi to all&lt;/P&gt;&lt;P&gt;My data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data&amp;nbsp; have;&lt;/P&gt;&lt;P&gt;input string $40.;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;33_we#fff23BOB_TS=234623623624756_TOO&lt;/P&gt;&lt;P&gt;BOB_TS=57335623566654756BO&lt;/P&gt;&lt;P&gt;60pBOB_TS=343467364563423TOp_#&lt;/P&gt;&lt;P&gt;WWBOB_TS=2346752665634cc90&lt;/P&gt;&lt;P&gt;9789BOB_TS=9872363566756Alll&lt;/P&gt;&lt;P&gt;ldldBOB_TS=2340235674025634efrwe&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to extract first 10 digits after string 'BOB_TS=' (example:&amp;nbsp; have 60pBOB_TS=&lt;STRONG&gt;3434675634&lt;/STRONG&gt;23TOp_#&amp;nbsp; want 3434675634 )&lt;/P&gt;&lt;P&gt;Ca somebody help me with this?&lt;/P&gt;&lt;P&gt;Thank you in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 13:16:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166137#M43046</guid>
      <dc:creator>bob021</dc:creator>
      <dc:date>2014-05-20T13:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Substring/Scan from string</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166138#M43047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;data&amp;nbsp; have;&lt;BR /&gt;input string $40.;&lt;BR /&gt;num=substr(string,index(string,'=')+1,10);&lt;BR /&gt;datalines;&lt;BR /&gt;33_we#fff23BOB_TS=234623623624756_TOO&lt;BR /&gt;BOB_TS=57335623566654756BO&lt;BR /&gt;60pBOB_TS=343467364563423TOp_#&lt;BR /&gt;WWBOB_TS=2346752665634cc90&lt;BR /&gt;9789BOB_TS=9872363566756Alll&lt;BR /&gt;ldldBOB_TS=2340235674025634efrwe&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 13:38:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166138#M43047</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2014-05-20T13:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Substring/Scan from string</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166139#M43048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much &lt;SPAN class="j-post-author "&gt;&lt;STRONG&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="-1" data-externalid="" data-presence="null" data-userid="815716" data-username="slchen" href="https://communities.sas.com/people/slchen" id="jive-81571615973233261443711"&gt;slchen&lt;/A&gt;&lt;/STRONG&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;Working like a charm&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 13:46:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166139#M43048</guid>
      <dc:creator>bob021</dc:creator>
      <dc:date>2014-05-20T13:46:09Z</dc:date>
    </item>
    <item>
      <title>Re: Substring/Scan from string</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166140#M43049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using PRX,&lt;/P&gt;&lt;P&gt;&lt;/P&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;&amp;nbsp; 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;input&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt; string &lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: teal; background: white;"&gt;$40.&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;digits=prxchange(&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: purple; background: white;"&gt;'s/(.+)((?&amp;lt;=BOB_TS=)\d{10}?)(.+)/$2/io'&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;, &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;,string);&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;datalines&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;33_we#fff23BOB_TS=234623623624756_TOO&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;BOB_TS=57335623566654756BO&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;60pBOB_TS=343467364563423TOp_#&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;WWBOB_TS=2346752665634cc90&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;9789BOB_TS=9872363566756Alll&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;ldldBOB_TS=2340235674025634efrwe&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;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; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; color: black; background: white;"&gt;Haikuo &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 13:48:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166140#M43049</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2014-05-20T13:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: Substring/Scan from string</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166141#M43050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Backward Match for Peal Regular Expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data&amp;nbsp; have;&lt;/P&gt;&lt;P&gt;input string $40.;&lt;/P&gt;&lt;P&gt;re = prxparse('/((?&amp;lt;=BOB_TS=)\d{10})/io');&lt;/P&gt;&lt;P&gt;if prxmatch(re,string) then want= prxposn(re,1,string);&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;33_we#fff23BOB_TS=234623623624756_TOO&lt;/P&gt;&lt;P&gt;BOB_TS=57335623566654756BO&lt;/P&gt;&lt;P&gt;60pBOB_TS=343467364563423TOp_#&lt;/P&gt;&lt;P&gt;WWBOB_TS=2346752665634cc90&lt;/P&gt;&lt;P&gt;9789BOB_TS=9872363566756Alll&lt;/P&gt;&lt;P&gt;ldldBOB_TS=2340235674025634efrwe&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Xia Keshan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 13:50:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166141#M43050</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2014-05-20T13:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: Substring/Scan from string</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166142#M43051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;bob=substr(string,find(string,'BOB_TS=')+7,10);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 13:50:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Substring-Scan-from-string/m-p/166142#M43051</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-05-20T13:50:16Z</dc:date>
    </item>
  </channel>
</rss>

