<?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: PRX matches with exceptions? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546239#M151217</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259143"&gt;@eyp500&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Better question - how accurate do you need it to be? If you miss a few will it matter?&lt;/P&gt;</description>
    <pubDate>Tue, 26 Mar 2019 17:05:56 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-03-26T17:05:56Z</dc:date>
    <item>
      <title>PRX matches with exceptions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546235#M151215</link>
      <description>&lt;P&gt;For a variable I have, I'd like to censor all addresses it contains if there is any.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;x = prxchange("s/(\w+) \b(STREET)\b/*LOCATION REMOVED*/",-1, 'I WAS WALKING ON QUEEN STREET IN THE MORNING');&lt;/P&gt;&lt;P&gt;put x=;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;But I also want to create exceptions, where prxchange ignores strings like 'THE STREET', as in 'I WAS DRIVING ON THE STREET'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible to do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 16:45:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546235#M151215</guid>
      <dc:creator>eyp500</dc:creator>
      <dc:date>2019-03-26T16:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: PRX matches with exceptions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546239#M151217</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/259143"&gt;@eyp500&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is it possible to do this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Better question - how accurate do you need it to be? If you miss a few will it matter?&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 17:05:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546239#M151217</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-03-26T17:05:56Z</dc:date>
    </item>
    <item>
      <title>Re: PRX matches with exceptions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546309#M151239</link>
      <description>&lt;P&gt;You would be more likely to achieve this if the street names were part of a finite set (like street names within a city). When you found one of those, you could confirm that it is used as a street name by its context.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 20:57:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546309#M151239</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-03-26T20:57:20Z</dc:date>
    </item>
    <item>
      <title>Re: PRX matches with exceptions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546333#M151256</link>
      <description>&lt;P&gt;You need to use a negative look-behind assertion.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  x = prxchange("s/(\w+)(?&amp;lt;!THE) \b(STREET)\b/*LOCATION REMOVED*/",-1, 'I WAS WALKING IN THE STREET IN THE MORNING');
  put x=;
  x = prxchange("s/(\w+)(?&amp;lt;!THE) \b(STREET)\b/*LOCATION REMOVED*/",-1, 'I WAS WALKING ON QUEEN STREET IN THE MORNING');
  put x=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;x=I WAS WALKING IN THE STREET IN THE MORNING&lt;BR /&gt;x=I WAS WALKING ON *LOCATION REMOVED* IN THE MORNING&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Mar 2019 22:36:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546333#M151256</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-03-26T22:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: PRX matches with exceptions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546481#M151319</link>
      <description>&lt;P&gt;Ideally we can't afford to not remove actual street names. We can censor too many and not risking showing actual addresses, but end user would prefer unnecessary censoring to be minimised. We do have a list of things we know we are safe to avoid replacing, such as 'street lamp', 'street light', 'residential street'.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 13:24:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546481#M151319</guid>
      <dc:creator>eyp500</dc:creator>
      <dc:date>2019-03-27T13:24:28Z</dc:date>
    </item>
    <item>
      <title>Re: PRX matches with exceptions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546483#M151321</link>
      <description>Unfortunately we don't have a list of street names (nationwide) and the worst part is there are many typos of street names within the data &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;</description>
      <pubDate>Wed, 27 Mar 2019 13:25:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546483#M151321</guid>
      <dc:creator>eyp500</dc:creator>
      <dc:date>2019-03-27T13:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: PRX matches with exceptions?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546484#M151322</link>
      <description>&lt;P&gt;Thank you so much! This works perfectly&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2019 16:17:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PRX-matches-with-exceptions/m-p/546484#M151322</guid>
      <dc:creator>eyp500</dc:creator>
      <dc:date>2019-03-27T16:17:34Z</dc:date>
    </item>
  </channel>
</rss>

