I need to replace a variable in a Makefile in Ruby
For ex (inside the Makefile):
VAR = 123
What I’m doing is:
puts text.gsub("VAR = 123", "VAR_NEW = 456")
The problem is that I don’t know the value, so I would like to use a regular expresion to replace ALL the line containing VAR =
What regular expresion can I use?
Can I use a different approach?
1 Answer