Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/259.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Regex插入空格C_C#_Regex - Fatal编程技术网

C# Regex插入空格C

C# Regex插入空格C,c#,regex,C#,Regex,我有一些绳子。我需要一个正则表达式,它将替换不是空格+'的每个符号 您可以尝试类似的方法。Related:您的代码片段的预期结果是什么? string pattern = "[^ ]<"; string replacement = "$0" + "<"; string result = Regex.Replace(html, pattern, replacement); string pattern = "([^ ])<"; string replacement

我有一些绳子。我需要一个正则表达式,它将替换不是空格+'的每个符号
您可以尝试类似的方法。

Related:您的代码片段的预期结果是什么?
string pattern = "[^ ]<";
string replacement = "$0" + "<";
string result = Regex.Replace(html, pattern, replacement);
   string pattern = "([^ ])<";
   string replacement = "$1" + " <";