So here the situation.
I have multiple strings that begin and end with a random amount of spaces. The problem is the string contains multiple words so I can\'t just rep
Assuming the quotes are really in there, then you want to use a regular expression:
(["'])\s*(.*[^\s])\s*(["'])
Simply replace it with:
$1$2$3
So:
string value = Regex.Replace("\" value to trim \"", @"([""'])\s*(.*[^\s])\s*([""'])", "$1$2$3");