title: Regex for replacing two strings in the same line
body: <p>For example I have this one line in a text file</p>
  
  <pre>
  Additional_Cost_utilities=(out.Utilities.Ener.Steam_cons.Value*0.056 + out.Utilities.Ener.Elec_cons.Value*0.09 + (STRING_NEW1*STRING_NEW2*0.003));
  </pre>
  
  <p>I need a regex to replace the tokens of STRING_NEW1 and STRING_NEW2 with some new strings. What regex could I use so that nothing else is edited in the line other than these two strings?</p>
  
  <p>Edit: The strings to be replaced are different each time. So I just cant use replace. A stable regex is required to modify the STRING_NEW1 and STRING_NEW2 tokens independently of their content, which will be float numbers </p>
  
  <p>The code I am trying to use to replace the strings in the specific line of a big coding part is the following. The regex needs to recognize the line and the tokens of the strings to be replaced. I hope this helps</p>
  
  <pre><code>try {
          Path path = Paths.get("read.m");
          Charset charset = StandardCharsets.UTF_8;
  
          String content = new String(Files.readAllBytes(path), charset);
  
          content = content.replace("STRING_1_IN_THE_LINE", "new string1")
                  .replace("STRING_2_IN_THE_LINE", "new string2");
  
          Files.write(path, content.getBytes(charset));
  
          } catch (IOException e) {
              //Simple exception handling, replace with what's necessary for your use case!
              throw new RuntimeException("Generating file failed", e);
           }
  </code></pre>