<?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: Enhanced Editor and Replace with Regular Expressions in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/970520#M377088</link>
    <description>&lt;P&gt;I would make sense but ... it can't&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;See&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/Regular-expression-search-and-replace-in-SAS-EG-is-broken/td-p/355847" target="_blank" rel="noopener"&gt;Solved: Regular expression search and replace in SAS EG is broken - SAS Support Communities&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jul 2025 13:43:03 GMT</pubDate>
    <dc:creator>ishmo65</dc:creator>
    <dc:date>2025-07-10T13:43:03Z</dc:date>
    <item>
      <title>Enhanced Editor and Replace with Regular Expressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74185#M16002</link>
      <description>I know that I can use regular expressions in the Enhanced Editor to find strings.  Is it possible to use regular expressions in the "Replace with:" box on the Replace window?&lt;BR /&gt;
&lt;BR /&gt;
Thank you.</description>
      <pubDate>Fri, 02 Oct 2009 13:34:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74185#M16002</guid>
      <dc:creator>advoss</dc:creator>
      <dc:date>2009-10-02T13:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: Enhanced Editor and Replace with Regular Expressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74186#M16003</link>
      <description>I can understand how a regular expression works for finding patterns - but how would a regular expression work for replacing a string? How exactly would it replace it??</description>
      <pubDate>Sat, 03 Oct 2009 08:49:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74186#M16003</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2009-10-03T08:49:26Z</dc:date>
    </item>
    <item>
      <title>Re: Enhanced Editor and Replace with Regular Expressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74187#M16004</link>
      <description>Unix tools like SED and AWK, Perl, too, I think, have provisions for remembering the "found" string and then altering it, like changing lower case to upper case, leaving all numerics alone and deleting the characters, etc.&lt;BR /&gt;
&lt;BR /&gt;
Probably a little to specialized for an IDE editor.</description>
      <pubDate>Sun, 04 Oct 2009 01:08:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74187#M16004</guid>
      <dc:creator>advoss</dc:creator>
      <dc:date>2009-10-04T01:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: Enhanced Editor and Replace with Regular Expressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74188#M16005</link>
      <description>It is possible.&lt;BR /&gt;
For example, enter &lt;B&gt;\d&lt;/B&gt; in the &lt;I&gt;find text&lt;/I&gt; box and enter &lt;B&gt;4&lt;/B&gt; in the &lt;I&gt;replace with&lt;/I&gt; box to replace all digits with 4.&lt;BR /&gt;
There seems to be a very limited set of regular expressions that can be used however.</description>
      <pubDate>Sun, 04 Oct 2009 21:27:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74188#M16005</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-10-04T21:27:20Z</dc:date>
    </item>
    <item>
      <title>Re: Enhanced Editor and Replace with Regular Expressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74189#M16006</link>
      <description>I was hoping that I might be able to do something like &lt;BR /&gt;
find string is \a\d\a&lt;BR /&gt;
replace string is \a_\a&lt;BR /&gt;
to replace all strings that have an alpha followed by a digit followed by and alpha to be replaced by the original alpha, and underscore, and the original trailing alpha.&lt;BR /&gt;
&lt;BR /&gt;
I think I am asking for a little too much.  There are other editors out there that will allow me to do something like this, or I can handle it in other ways.&lt;BR /&gt;
&lt;BR /&gt;
Thanks for your thoughts.&lt;BR /&gt;
&lt;BR /&gt;
This thread can be closed</description>
      <pubDate>Mon, 05 Oct 2009 13:24:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74189#M16006</guid>
      <dc:creator>advoss</dc:creator>
      <dc:date>2009-10-05T13:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Enhanced Editor and Replace with Regular Expressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74190#M16007</link>
      <description>Many text editors I've used, and many programming languages, support replacement by regular expressions. The simplest case is replacing the text that is matched with new text. For example (in vi)&lt;BR /&gt;
&lt;BR /&gt;
s/June/July/&lt;BR /&gt;
&lt;BR /&gt;
replaces the text "June" with "July". You can also identify a part or several parts of the regular expression (typically by surrounding it/them with parentheses). The text matched by that part is replaced with new text. For example, in my text editor I can specify this regular expression as a search target:&lt;BR /&gt;
&lt;BR /&gt;
(\c+)blank&lt;BR /&gt;
&lt;BR /&gt;
This means "any string that starts with at least one alphabetic character followed by "blank". The parentheses around \c+ "tags" that part of the match. Then I specify this as the replacement string:&lt;BR /&gt;
&lt;BR /&gt;
blank\1&lt;BR /&gt;
&lt;BR /&gt;
This replaces the match with the string blank followed by the first (in our case, only) tagged expression. That is, whatever \c+ matched.&lt;BR /&gt;
&lt;BR /&gt;
So, if I have the words "ageblank" and "sexblank" in my text, they are replaced by "blankage" and "blanksex", respectively.</description>
      <pubDate>Mon, 05 Oct 2009 13:40:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74190#M16007</guid>
      <dc:creator>Tim_SAS</dc:creator>
      <dc:date>2009-10-05T13:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Enhanced Editor and Replace with Regular Expressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74191#M16008</link>
      <description>It would make sense that the enhanced editor could do what you both mention. &lt;BR /&gt;
&lt;BR /&gt;
Indeed, the fact that a regexp check box is available would seem to imply that this is the case.&lt;BR /&gt;
&lt;BR /&gt;
The only use I have found for this feature is to search (not replace) using the few expressions available using the &amp;gt; button beside the &lt;I&gt;find&lt;/I&gt; box.</description>
      <pubDate>Tue, 06 Oct 2009 00:15:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/74191#M16008</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2009-10-06T00:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Enhanced Editor and Replace with Regular Expressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/970519#M377087</link>
      <description>&lt;P&gt;Assuming you mean Find/Replace in SAS EG's editor or a similar SAS-based program editor, the short answer is ... no !&lt;/P&gt;
&lt;P&gt;See&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/Regular-expression-search-and-replace-in-SAS-EG-is-broken/td-p/355847" target="_blank" rel="noopener"&gt;Solved: Regular expression search and replace in SAS EG is broken - SAS Support Communities&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Contrary to the title, it is not "solved". Comments added by a SAS employee on that Thread confirm SAS EG does not have this functionality in the Replace even though it can be used in the Find&lt;/P&gt;
&lt;P&gt;In simple terms what you're asking is ... can you (for example):&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Find:&lt;/EM&gt; (.*)_date&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Replace:&lt;/EM&gt; date_\1&lt;/P&gt;
&lt;P&gt;and clicking Replace (or Replace All) with Match whole word on and regular expression turned on (this should flip "date" as a prefix instead of a suffix) ?&lt;BR /&gt;But this does not work in SAS EG, whereas it will work in Notepad++ (which is where I end up doing these sorts of reg-exp changes).&lt;/P&gt;
&lt;P&gt;On the flip side:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Find:&lt;/EM&gt; (.*)_date&lt;/P&gt;
&lt;P&gt;clicking Find (not Replace) will work, finding words that have _date as a suffix.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 13:41:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/970519#M377087</guid>
      <dc:creator>ishmo65</dc:creator>
      <dc:date>2025-07-10T13:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Enhanced Editor and Replace with Regular Expressions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/970520#M377088</link>
      <description>&lt;P&gt;I would make sense but ... it can't&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;See&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/Regular-expression-search-and-replace-in-SAS-EG-is-broken/td-p/355847" target="_blank" rel="noopener"&gt;Solved: Regular expression search and replace in SAS EG is broken - SAS Support Communities&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jul 2025 13:43:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Enhanced-Editor-and-Replace-with-Regular-Expressions/m-p/970520#M377088</guid>
      <dc:creator>ishmo65</dc:creator>
      <dc:date>2025-07-10T13:43:03Z</dc:date>
    </item>
  </channel>
</rss>

