I am building a string of last names separated by hyphens. Sometimes a whitespace gets caught in there. I need to remove all whitespace from end result.
Sample strin
Instead of a RegEx use Replace for something that simple:
RegEx
Replace
LastName = LastName.Replace(" ", String.Empty);