regexWed, 01 Mar 2023

how remove all symbols and whitespaces from start and end in C#

str = Regex.Replace(str, @"\s+", "");

Questions about programming?Chat with your personal AI assistant