Created
June 3, 2018 04:10
-
-
Save moorer2k/d47959e63ebbf2f2f2ad5d2b6e58f296 to your computer and use it in GitHub Desktop.
decodeURI Javascript equivlent for VB.NET. When DecodeURL / Unescape does not work for you.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Public Function DecodeUri(ByVal inputText As String) | |
Dim rx As New System.Text.RegularExpressions.Regex("(\\x.{2})") | |
For Each m As System.Text.RegularExpressions.Match In rx.Matches(inputText) | |
inputText = inputText.Replace(m.Groups(1).Value, Chr(m.Groups(1).Value.Replace("\x", "&H"))) | |
Next | |
Return inputText | |
End Function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment