作者:六月的 | 来源:互联网 | 2023-05-19 14:13
IhavethefollowingfunctionthatIamusingtoremovethecharacters\04andnullsfrommyxmlStri
I have the following function that I am using to remove the characters \04 and nulls from my xmlString but I can't find what do I need to change to avoid removing the \ from my ending tags. This is what I get when I run this function
我有以下函数,我用来从我的xmlString中删除字符\ 04和nulls但我找不到我需要更改什么以避免从我的结束标记中删除\。这是我运行此功能时获得的
20080625201106066267831FALSEFALSE
Can anybody help me find out what do I need to change in my expression to keep the ending tag as
任何人都可以帮我找出我需要在表达式中进行哪些更改以将结束标记保留为
Private Function CleanInput(ByVal inputXML As String) As String
' Note - This will perform better if you compile the Regex and use a reference to it.
' That assumes it will still be memory-resident the next time it is invoked.
' Replace invalid characters with empty strings.
Return Regex.Replace(inputXML, "[^><\w\.@-]", "")
End Function
1 个解决方案