<?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 PRX MATCH with a wild card for the middle of a string in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PRX-MATCH-with-a-wild-card-for-the-middle-of-a-string/m-p/424969#M104658</link>
    <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a file with many text fields like the one below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA A;&lt;/P&gt;
&lt;P&gt;TEXTO="Expenditures pursuant to paragraph 21(3) of the Nuclear Safety and Control Act"; output;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure however how this text is written exactly: it could be Expenditures pursuant to the Nuclear&amp;nbsp;Safety and Control Act or any&lt;/P&gt;
&lt;P&gt;other possible version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I am looking for a wild card inside a prxmatch command&amp;nbsp;that would return this string with anything between &amp;nbsp;Expend and Act.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Verdana"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Verdana"&gt; B; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Verdana"&gt;SET&lt;/FONT&gt;&lt;FONT face="Verdana"&gt; A;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Verdana"&gt;if&lt;/FONT&gt;&lt;FONT face="Verdana"&gt; prxmatch(&lt;/FONT&gt;&lt;FONT color="#800080" face="Verdana"&gt;'/Expend &lt;FONT color="#ff0000"&gt;(INSERT WILD CARD)&lt;/FONT&gt; Act/'&lt;/FONT&gt;&lt;FONT face="Verdana"&gt;,TEXTO) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Verdana"&gt;then&lt;/FONT&gt;&lt;FONT face="Verdana"&gt; FLAG=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Verdana"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Verdana"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Verdana"&gt;run&lt;/FONT&gt;&lt;FONT face="Verdana"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 04 Jan 2018 16:32:52 GMT</pubDate>
    <dc:creator>nketata</dc:creator>
    <dc:date>2018-01-04T16:32:52Z</dc:date>
    <item>
      <title>PRX MATCH with a wild card for the middle of a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-MATCH-with-a-wild-card-for-the-middle-of-a-string/m-p/424969#M104658</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a file with many text fields like the one below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATA A;&lt;/P&gt;
&lt;P&gt;TEXTO="Expenditures pursuant to paragraph 21(3) of the Nuclear Safety and Control Act"; output;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure however how this text is written exactly: it could be Expenditures pursuant to the Nuclear&amp;nbsp;Safety and Control Act or any&lt;/P&gt;
&lt;P&gt;other possible version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So I am looking for a wild card inside a prxmatch command&amp;nbsp;that would return this string with anything between &amp;nbsp;Expend and Act.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#000080" face="Verdana"&gt;&lt;STRONG&gt;DATA&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Verdana"&gt; B; &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Verdana"&gt;SET&lt;/FONT&gt;&lt;FONT face="Verdana"&gt; A;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Verdana"&gt;if&lt;/FONT&gt;&lt;FONT face="Verdana"&gt; prxmatch(&lt;/FONT&gt;&lt;FONT color="#800080" face="Verdana"&gt;'/Expend &lt;FONT color="#ff0000"&gt;(INSERT WILD CARD)&lt;/FONT&gt; Act/'&lt;/FONT&gt;&lt;FONT face="Verdana"&gt;,TEXTO) &lt;/FONT&gt;&lt;FONT color="#0000ff" face="Verdana"&gt;then&lt;/FONT&gt;&lt;FONT face="Verdana"&gt; FLAG=&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#000080" face="Verdana"&gt;1&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Verdana"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#0000ff" face="Verdana"&gt;run&lt;/FONT&gt;&lt;FONT face="Verdana"&gt;;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jan 2018 16:32:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-MATCH-with-a-wild-card-for-the-middle-of-a-string/m-p/424969#M104658</guid>
      <dc:creator>nketata</dc:creator>
      <dc:date>2018-01-04T16:32:52Z</dc:date>
    </item>
    <item>
      <title>Re: PRX MATCH with a wild card for the middle of a string</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-MATCH-with-a-wild-card-for-the-middle-of-a-string/m-p/424972#M104659</link>
      <description>&lt;P&gt;There are a ton of&amp;nbsp;different 'wildcard' type things in perl regular expressions, but the simplest is .*&amp;nbsp; (match any character = . , and then * means match&amp;nbsp;zero or more of them).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
DATA A;

TEXTO="Expenditures pursuant to paragraph 21(3) of the Nuclear Safety and Control Act"; output;

run;

DATA B; SET A;

if prxmatch('/Expend.*Act/',TEXTO) then FLAG=1;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Jan 2018 16:34:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-MATCH-with-a-wild-card-for-the-middle-of-a-string/m-p/424972#M104659</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2018-01-04T16:34:59Z</dc:date>
    </item>
  </channel>
</rss>

