How to remove specific (unicode) characters in a String using C# and VB.NET

Here is an example on how to remove specific (unicode) characters in a String using C# and VB.NET

Samples

C# Sample

VB.NET Sample

Result

RegexReplaceUnicodeChars

If you have any questions or suggestions feel free to rate this snippet, post a comment or Contact Us via Email.

Related links:

Please rate this snippet

How to get the VideoID of a youtube video using Regex

To get the VideoID of a youtube video using Regex you can use the following snippet.

Sample Regex

^(?:http(?:s)?:\/\/)?(?:www\.)?(?:youtu\.be\/|youtube\.[a-zA-Z]{1,3}\/(?:(?:watch)?\?(?:.*&)?v(?:i)?=|(?:embed|v|vi|user)\/))([^\?&\”‘>]+)

This will match the Vl1tVxfFf1A in https://www.youtube.com/watch?v=Vl1tVxfFf1A.

A more complex regex matching more youtube link variants can be found How to get the Youtube VideoId from Url in C# and VB.NET

Please rate this snippet