BookmarkSubscribeRSS Feed

The current Replace dialog is only regex search. 

The text matching the regex pattern is replaced with the Replace with field literally.


The dialog should be improved to handle regex replacement as well.  Replace with: would allow find capture groups to be referenced as  $1, $2, $3, etc


For example, suppose I want to add square brackets around a sequence of consecutive digits.


ee search and replace.png


Named capture groups should also be supported. For example:


Find: (?'digitrun'\d+)

Replace: [${digitrun}]


The issue of no captures in replacement goes back to at least May 2017. See this post in communities 


Because EG uses Enhanced Editor, the improvement should carry over into Windows SAS DM sessions.  If regex search and replace feature is not part of SAS Studio editor then that editor should be improved as well.

1 Comment
Community Manager

@RichardDeVen Good suggestion. One note though: the editor in SAS Enterprise Guide is not the Enhanced Editor you find in PC SAS on Windows.  Those two codebases diverged a while ago, as SAS Enterprise Guide was improved to take advantage of newer capabilities.  PC SAS has stayed the same.  (Why? Because most new SAS users do not receive access to PC SAS.  They get SAS Enterprise Guide or SAS Studio to access a centralized SAS environment.)