Closes #54331 Updates #50848 Release Notes: - Fixed hang in replace all when the query contained non-ASCII text and regex-special characters