I would like to find out how to change occurrences of something like <d:0x8101> (thanks Exchange WebDAV!) in an XML response to <d:x8101> . Note that the expression I'm interested in must always begin with < and end with > . The < can be followed by any letter (usually lower case, but both cases would be safer). The number after : is always 0, followed by an x, and then there are always four digits. I believe that I can match it with something like "<[a-z]:0x[0-9]+>" (although there are probably lots of better ones), but I don't know how to supply a replacement string to the RegExp object's .Replace method. Something like;
Dim objRegEx As New RegEx("<[a-z]:0x[0-9]+>")
newText = objRegEx.Replace(myXMLText
, something) ' what do I use instead of "something" here?
Start Free Trial