I was looking for a way to replace all special characters with a replace function. I want to use the Razor syntax but this
@Product.Name.Regex.Replace(@"[^A-Za-z0-9/\s/g]", "_")
does not do the trick.
I've tried this
@Regex.Replace(@Product.Name,@"[^A-Za-z0-9/\s/g]", "_")
and it failed as well.
By now I've tried a lot of other things and a lot of times I keep getting this error message: "The name 'Regex' does not exist in the current context"
Can anybody please help?