Untitled

 avatar
JCallico
plain_text
2 months ago
322 B
1
Indexable
Never
using System.Text.RegularExpressions;

// Assuming Config is a Dictionary or another appropriate data structure
string requiredConfig = Config["required"];
string pattern = @"(\s+|\n)?,(\s+|\n)?";
string replacement = ",";

string result = Regex.Replace(requiredConfig, pattern, replacement);
Config["required"] = result;
Leave a Comment