Replacing all except alpha numeric characters in C#

REGEX stands for Regular expression.
Using regex, we can replace the characters,numbers with a string.

Syntax:
Regex regex = new Regex("[Regular expression]");
output = regex.Replace("input_string", "substitution_string");


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {          

            string filename = "My name is C-SHARP 007; (got it !)";
            //find all characters that are letters
            Regex regex = new Regex("[^a-zA-Z0-9]");
            filename = regex.Replace(filename, "$");

            Console.WriteLine(filename);
                        
        }

    }
}
   


Output:
My$name$is$C$SHARP$007$$$got$it$$$