Okay this: substituteInPlace lib/lib.subnet \ --replace \( \ \(''$\{ \ --replace \) \}\) transforms this: in => a nand (maths_boolean_nand) out => out in => b nand () to: in => a nand (${maths_boolean_nand}) out => out in => b nand (${})