I have a string with many lines separated by carriage return. One of the line start with:
“ESD: …” The … is the date, of which varies from time to time.
How can I replace this line with: “ESD: the actual day in a string variable” ? Is there way to match the “ESD:…” up to the carriage return so that I can use the string.replace("old’Str, “newStr”)
You can also look into using the Substring and IndexOf methods. If the date is always of constant length(01-01-2019, 23-01-2019 etc.), you should be able to remove it easily.