I’m not entirely sure if this is a missing/unimplemented feature or an actual bug, but it appears that you cannot replace matches in the script editor’s find and replace tool that contain newlines. The find tool will successfully match expressions containing newlines, but pressing the replace button will do nothing.
Notably you can only capture newlines when using regex, so my very uneducated guess is that the replace tool has not been set up to handle new lines since (I’m assuming) most of the time people do not use regex mode.
Expected behavior
Given the following script,
local Something = {
"Hello Regex!"
}
the regex expression local.+?\{\n.+?(".+?")\n\}
and replacement print(\1)
should transform it into
print("Hello Regex!")
Additional Details
Just in case these details are necessary, I have tried this in a Studio instance launched with -disableLoadUserPlugins
in a fresh place.
The operating system I am using for Studio is Windows 11.