Replace using variable not working
Posted: Wed Dec 31, 2014 4:45 pm
I'm trying to use replace with a variable, as this:
replace cb with "stuff" in fileContent
cb is a variable containing a block of text taken from fileContent, I'm trying to replace that block with other stuff in the variable fileContent.
But I'm getting this error: stack "main": execution error at line 119 (replace: error in pattern expression), char 1
It works if I put some text, replace "text" with "other text" in fileContent, just not with a variable
replace cb with "stuff" in fileContent
cb is a variable containing a block of text taken from fileContent, I'm trying to replace that block with other stuff in the variable fileContent.
But I'm getting this error: stack "main": execution error at line 119 (replace: error in pattern expression), char 1
It works if I put some text, replace "text" with "other text" in fileContent, just not with a variable