How to remove numbers from string using Regex.Replace?

c#, regex

Solution

Try the following:

var output = Regex.Replace(input, @"[\d-]", string.Empty);

The `\d` identifier simply matches any digit character.

Problem

I need to use `Regex.Replace` to remove all numbers and signs from a string. Example input: `123- abcd33` Example output: `abcd`

Original source