如何在 C# 中使用 RegEx 将整个文本替换为 XXX?它将替换等于字符串长度的 X 的数量。
例如原始文本是Apple替换为XXXXX
板球与XXXXXX
你好,XX
优秀的XXXXXXXXXXXX
String MyText = "Apple";
//For following line i have to written regexp to achieve
String Output = "XXXXX"; //Apple will replace with 5 times X because Apple.length = 5