Trying to use a regex group to replace the matched string doesn’t seem to be working.
e.g. if I wanted to replace all PlaySound(<SOUND_NAME>) with PlaySound(true, <SOUND_NAME>) I should be able to use PlaySound\((.+)\) to match every occurrence and then replace it with PlaySound(true, \1) to get what I wanted.
Reproduction Steps
create a script and put this line in it PlaySound('test')
use CTRL+Shift+F to open up the studio Find All / Replace All window.
enable regular expressions and match the string (while also capturing a group inside the parentheses) using this pattern PlaySound\((.+)\)
put PlaySound(true, \1) in the replace field and click “Replace All” button
Expected Behavior
it should use the first regex group (.+) to replace PlaySound('test') with PlaySound(true, 'test')
Actual Behavior
it replaces with an actual “\1” string: PlaySound(true, \1) instead of using the matched regex group
It’s worth noting that this actually works in a single script
Issue Area: Studio Impact: Low Frequency: Constantly
Surprised this has yet to receive a single reply. It’s things like these that unfortunately push developers away from studio and into external solutions like visual studio code, where features like these are a given instead of something you wait 4 months to maybe get.
Small quality of life features add up into huge issues quickly.
Sorry for the bump, but this really should have a reply by now, and hopefully this reply will cause it.
I guess since this still hasn’t been fixed and I’m currently in need of this, the only alternative is to use search all to find the scripts where the string we want to replace is located,
and then jumping to there using the FindAll. After which replacing everything within the scripts Search bar.
An extra step but it’s better than nothing