Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function EncodeForXml(ByVal data As String) As String
- Static badAmpersand As Regex = new Regex("&(?![a-zA-Z]{2,6};|#[0-9]{2,4};)")
- data = badAmpersand.Replace(data, "&")
- ''// more processing
- return data
- End Function
- private static readonly RegEx badAmpersand = new RegEx("...");
Add Comment
Please, Sign In to add comment