I apologize if this question has been asked before, all the previous posts on this topic were helpful but I'm still having trouble figuring out the solution to my problem. I'm still very new to programming and regex, I'm sorry if this comes off as a dumb question.
I need a regex pattern that will take the value between 3 specific xml tags. And replace that value with nothing.
This is what I currently have:
string pattern = @"<A99_01>(.*?)</A99_01>";
string input = "<A99_01>TEST</A99_01><A99_02>TEST</A99_02><A99_03>TEST</A99_03><A99_04>TEST</A99_04>";
string replacement = "";
Regex rgx = new Regex(pattern);
string result = rgx.Replace(input, replacement);
My current regex pattern only matches one of the required tags, I can't figure how to only select its value without pulling the entire line. Is it possible to list multiple patterns?
I want to only perform the replace on tags <A99_01>,<A99_02>, and <A99_03> without touching any tags above <E99_04>.
Thanks in advance for any help!