Example this is the string:
"Hello, this is challenging\n" + "you think it is easy?\n" + variableName + " 3 + 4 = 7\n"
Dim example = """Hello, this is challenging\n"" + ""you think it is easy?\n"" + variableName + "" 3 + 4 = 7\n"""
I want to use programming approach to arrange the string becomes:
"Hello, this is challenging" + newline + "you think it is easy?" + newline + variableName + " 3 + 4 = 7" + newline
Dim output = """Hello, this is challenging"" + newline + ""you think it is easy?"" + newline + variableName + "" 3 + 4 = 7"" + newline"
So as you can see, it involves in getting the text inside quotation
So I am thinking:
1. use regex to get the quotation, but as you can see we will left out the variableName
2. I am thinking to split using + sign, but as you can see, there will be false positive in " 3 + 4 = 7"
tell me what do you think, is it easy? Is there another steps?
Updated example and output:
Dim example2 = """Hello, this \nis challenging\n"" + ""you think it is easy?\n"" + variableName + "" 3 + 4 = 7\n"""
Dim output2 = """Hello, this "" + newline + ""is challenging"" + newline + ""you think it is easy?"" + newline + variableName + "" 3 + 4 = 7"" + newline"