I would make sense but ... it can't
See Solved: Regular expression search and replace in SAS EG is broken - SAS Support Communities
Assuming you mean Find/Replace in SAS EG's editor or a similar SAS-based program editor, the short answer is ... no !
See Solved: Regular expression search and replace in SAS EG is broken - SAS Support Communities
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
In simple terms what you're asking is ... can you (for example):
Find: (.*)_date
Replace: date_\1
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) ?
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).
On the flip side:
Find: (.*)_date
clicking Find (not Replace) will work, finding words that have _date as a suffix.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.