replacing text within quotes until next quote
- by Jordan Trainor
String input = "helloj\"iojgeio\r\ngsk\\"jopri\"gj\r\negjoijisgoe\"joijsofeij\"\"\"ojgsoij\"";
This is my current code that works but iv added some code that has to run before this which makes
some '"' split onto another line thus making the code below obsolute unless under certain cirumstances
the '"' is not put onto the next line.
firstQuote = input.IndexOf("\"");
lastQuote = input.LastIndexOf("\"");
input = input.Substring(0, firstQuote) + "<span>quote" +
input.Substring(firstQuote + 1, lastQuote - (firstQuote + 1) + "quote</span>" +
input.Substring(lastQuote + 1, lines.Length - (lastQuote + 1);
How could I change the input string from
input = "helloj\"iojgeio\r\ngsk\\"jopri\"gj\r\negjoijisgoe\"joijsofeij\"\"\"ojgsoij\"";
to
input = "helloj(<span>quoteiojgeio\r\ngsk\\"jopriquote</span>gj\r\negjoijisgoe<span>quotejoijsofeijquote</span>quote<span>quote</span>ojgsoij<span>quote</span>";