I am trying to replace a string that is not surrounded by brackets. When I am using string.Replace()
, it replaces all values (inside and outside of brackets). What should i use to replace values that is only outside of brackets?
Original string: "Example string: `REPLACEME` (`REPLACEME`)"
Required string: "Example string: `REPLACEMENT` (`REPLACEME`)"
P.S. I am not trying to replace first value from string, important here to replace value OUT OF BRACKETS