<?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 Regular expression search and replace in SAS EG is broken in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regular-expression-search-and-replace-in-SAS-EG-is-broken/m-p/355847#M23424</link>
    <description>&lt;P&gt;EG&amp;nbsp;6.1 M1 (6.100.0.4025) (32-bit)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I pasted a bunch of text from Excel (list of variable names, one per line) into EG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now want to make them comment headers for each code block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I tried: &amp;nbsp;Cntl-H, Find text = ^, Replace with = \* , tick Regular expression search, click Replace All (or Replace in Selection). &amp;nbsp;&lt;/P&gt;&lt;P&gt;Error message "Cannot find the string "^" ".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried the same using the "right arrow/play button" pulldown for ^ Start of line. &amp;nbsp;Same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also tried: &amp;nbsp;&lt;SPAN&gt;Find text = $, Replace with = ; . &amp;nbsp;Same error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Workaround: &amp;nbsp;paste into Textpad, search and replace (F8), do the same thing as above, it works fine. &amp;nbsp;Paste back into EG.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(In Textpad, Find text =&amp;nbsp;^(.*)$, Replace text = \* \1 ; does it all in one search and replace, which is kind of cool.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone comment 1) if they also experience this issue in EG 6.x, and 2) is it fixed in later releases?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 May 2017 05:30:01 GMT</pubDate>
    <dc:creator>ScottBass</dc:creator>
    <dc:date>2017-05-04T05:30:01Z</dc:date>
    <item>
      <title>Regular expression search and replace in SAS EG is broken</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regular-expression-search-and-replace-in-SAS-EG-is-broken/m-p/355847#M23424</link>
      <description>&lt;P&gt;EG&amp;nbsp;6.1 M1 (6.100.0.4025) (32-bit)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I pasted a bunch of text from Excel (list of variable names, one per line) into EG.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now want to make them comment headers for each code block.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I tried: &amp;nbsp;Cntl-H, Find text = ^, Replace with = \* , tick Regular expression search, click Replace All (or Replace in Selection). &amp;nbsp;&lt;/P&gt;&lt;P&gt;Error message "Cannot find the string "^" ".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tried the same using the "right arrow/play button" pulldown for ^ Start of line. &amp;nbsp;Same error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also tried: &amp;nbsp;&lt;SPAN&gt;Find text = $, Replace with = ; . &amp;nbsp;Same error.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Workaround: &amp;nbsp;paste into Textpad, search and replace (F8), do the same thing as above, it works fine. &amp;nbsp;Paste back into EG.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(In Textpad, Find text =&amp;nbsp;^(.*)$, Replace text = \* \1 ; does it all in one search and replace, which is kind of cool.)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Can anyone comment 1) if they also experience this issue in EG 6.x, and 2) is it fixed in later releases?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 05:30:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regular-expression-search-and-replace-in-SAS-EG-is-broken/m-p/355847#M23424</guid>
      <dc:creator>ScottBass</dc:creator>
      <dc:date>2017-05-04T05:30:01Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression search and replace in SAS EG is broken</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regular-expression-search-and-replace-in-SAS-EG-is-broken/m-p/356002#M23443</link>
      <description>&lt;P&gt;The regular expression parser in the editor seems to be only a subset of regular expressions.&lt;/P&gt;
&lt;P&gt;Part of the issue with the search and replace in the editor is that it has to handle the non-regular expressions as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might be able to use&lt;/P&gt;
&lt;P&gt;Search for \n&lt;/P&gt;
&lt;P&gt;Replace \n/*&lt;/P&gt;
&lt;P&gt;for the start of a line&lt;/P&gt;
&lt;P&gt;or search \n&lt;/P&gt;
&lt;P&gt;replace */\n for end of line&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but generally I would find the editor Ctrl-/ on a block or line of text easier.&lt;/P&gt;</description>
      <pubDate>Thu, 04 May 2017 15:21:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regular-expression-search-and-replace-in-SAS-EG-is-broken/m-p/356002#M23443</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-05-04T15:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: Regular expression search and replace in SAS EG is broken</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regular-expression-search-and-replace-in-SAS-EG-is-broken/m-p/356586#M23470</link>
      <description>&lt;P&gt;You are actually running into two limitations of the Find/Replace dialog in the&amp;nbsp;EG editor...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1)&amp;nbsp;It doesn't currently handle zero-width regular expression matches (such as lone&amp;nbsp;^ and $).&amp;nbsp;&amp;nbsp;If you&amp;nbsp;use those anchors in regular expressions that return greater-than-zero-width matches, it'll&amp;nbsp;find the matches&amp;nbsp;just fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) It doesn't currently allow regular expression&amp;nbsp;substitutions in the replacement text.&amp;nbsp; (ex. a capture)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;We are aware of both of these limitations (which still exist in the latest version of EG) and hope to be able to address them in a future release.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Casey&lt;/P&gt;</description>
      <pubDate>Sat, 06 May 2017 03:08:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Regular-expression-search-and-replace-in-SAS-EG-is-broken/m-p/356586#M23470</guid>
      <dc:creator>CaseySmith</dc:creator>
      <dc:date>2017-05-06T03:08:49Z</dc:date>
    </item>
  </channel>
</rss>

