I have a large value on a String variable, I want to keep just some of it, I don’t know the exact position in the String in which my data is located as it could vary any time, but I know it’s in between specific tags, so how could I keep only what’s inside those tags?
Example of the kind of string I have:
Dim var as String = "
<random> <stuffIDontNeed> <x>1</x> <x>2</x> <x>3</x>
</stuffIDontNeed> <stuffIDoNeed> <x>a</x> <x>b</x> <x>c</x>
</stuffIDoNeed> </random> "
It’s all inside the same String I just used multiple lines so it showed fully without scrolling.
So what I want to do is to get everything from where stuffIDoNeed starts to where it ends, tags and everything not only the values in them.
This will extract the substring from the input string (Please don’t use var as variable name, it is confusing)