Using String.Replaceall Regex to replace XML Element
807588Jun 16 2009 — edited Jun 16 2009I was looking at string.replaceall and I saw that it can take in a regex string to replace a value of a string.
I have an element that I want to effectively delete within an xml string. I've tried something like:
result = result.replaceAll("\\A<name>\\z</name>","");
Where \A is supposed to denote the beginning of the input and \z is supposed to denote the end of input, but I think I have something wrong. I have to do it similar to this because I need to delete the data inside the tag as well.