<?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: Obtain perl expression of an entry in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Obtain-perl-expression-of-an-entry/m-p/603216#M174778</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/75799"&gt;@banksider&lt;/a&gt;,&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/75799"&gt;@banksider&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;(...) x1 = "123-". If I use prxparse("/\ddd-/") and prxmatch I can return position 1 for this value.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You mean &lt;FONT face="courier new,courier"&gt;"/\d&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;\&lt;/FONT&gt;&lt;/STRONG&gt;d&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;\&lt;/FONT&gt;&lt;/STRONG&gt;d-/"&lt;/FONT&gt;, right?&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Now, if&amp;nbsp;I didn't know ("/\ddd-/"),&amp;nbsp;would there be a way for me to&amp;nbsp;obtain ("/\ddd-/")&amp;nbsp; from &amp;nbsp;"123-"?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The first thing I virtually always do to obtain a regular expression is to open the&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0s9ilagexmjl8n1u7e1t1jfnzlk.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;Tables of Perl Regular Expression (PRX) Metacharacters&lt;/A&gt;.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;That's, is there a way to obtain the perl regular expressions for any entry?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't think there's an &lt;EM&gt;automated&lt;/EM&gt; way to obtain "the" regex for any entry, simply because it is not unique: In your example there is a variety of matching regular expressions (depending on the purpose) ranging from very specific expressions such as&amp;nbsp;&lt;FONT face="courier new,courier"&gt;"/123-/"&lt;/FONT&gt; to very general expressions like&amp;nbsp;&lt;FONT face="courier new,courier"&gt;"/.*/"&lt;/FONT&gt;. You may want to choose&amp;nbsp;&lt;FONT face="courier new,courier"&gt;"/\&lt;FONT color="#000000"&gt;d\d\d&lt;/FONT&gt;-/"&lt;/FONT&gt; for your purposes, but others would prefer, e.g.,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;"/\w{3}?-/"&lt;/FONT&gt; for their purposes.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Nov 2019 14:23:33 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2019-11-11T14:23:33Z</dc:date>
    <item>
      <title>Obtain perl expression of an entry</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Obtain-perl-expression-of-an-entry/m-p/603198#M174763</link>
      <description>&lt;P&gt;Suppose that&amp;nbsp;variable x1 has value "123-". That is, x1 = "123-". If I use prxparse("/\ddd-/") and prxmatch I can return position 1 for this value. Now, if&amp;nbsp;I didn't know ("/\ddd-/"),&amp;nbsp;would there be a way for me to&amp;nbsp;obtain ("/\ddd-/")&amp;nbsp; from &amp;nbsp;"123-"? That's, is there a way to obtain the perl regular expressions for any entry?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 13:43:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Obtain-perl-expression-of-an-entry/m-p/603198#M174763</guid>
      <dc:creator>banksider</dc:creator>
      <dc:date>2019-11-11T13:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: Obtain perl expression of an entry</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Obtain-perl-expression-of-an-entry/m-p/603216#M174778</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/75799"&gt;@banksider&lt;/a&gt;,&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/75799"&gt;@banksider&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;(...) x1 = "123-". If I use prxparse("/\ddd-/") and prxmatch I can return position 1 for this value.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You mean &lt;FONT face="courier new,courier"&gt;"/\d&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;\&lt;/FONT&gt;&lt;/STRONG&gt;d&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;\&lt;/FONT&gt;&lt;/STRONG&gt;d-/"&lt;/FONT&gt;, right?&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Now, if&amp;nbsp;I didn't know ("/\ddd-/"),&amp;nbsp;would there be a way for me to&amp;nbsp;obtain ("/\ddd-/")&amp;nbsp; from &amp;nbsp;"123-"?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The first thing I virtually always do to obtain a regular expression is to open the&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=lefunctionsref&amp;amp;docsetTarget=p0s9ilagexmjl8n1u7e1t1jfnzlk.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank" rel="noopener"&gt;Tables of Perl Regular Expression (PRX) Metacharacters&lt;/A&gt;.&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;That's, is there a way to obtain the perl regular expressions for any entry?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I don't think there's an &lt;EM&gt;automated&lt;/EM&gt; way to obtain "the" regex for any entry, simply because it is not unique: In your example there is a variety of matching regular expressions (depending on the purpose) ranging from very specific expressions such as&amp;nbsp;&lt;FONT face="courier new,courier"&gt;"/123-/"&lt;/FONT&gt; to very general expressions like&amp;nbsp;&lt;FONT face="courier new,courier"&gt;"/.*/"&lt;/FONT&gt;. You may want to choose&amp;nbsp;&lt;FONT face="courier new,courier"&gt;"/\&lt;FONT color="#000000"&gt;d\d\d&lt;/FONT&gt;-/"&lt;/FONT&gt; for your purposes, but others would prefer, e.g.,&amp;nbsp;&lt;FONT face="courier new,courier"&gt;"/\w{3}?-/"&lt;/FONT&gt; for their purposes.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2019 14:23:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Obtain-perl-expression-of-an-entry/m-p/603216#M174778</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2019-11-11T14:23:33Z</dc:date>
    </item>
  </channel>
</rss>

