本帖最后由 小白龙 于 2023-5-27 18:04 编辑
回复 16# idwma
$s = gc -Path "$HOME\Desktop\abc.txt"
用gc获取文件中的字符串, 多行的结果不正确 ,并在一行了, 把字符串写在代码中没事- $s = @'
- using System;
- public class xx
- {
- public static void Main()
- {
- string s = "xzc abc(s \"(abc)\")); dfg()";
- string s = "xzc abc(s \"(abc)\")); dfg()";
- string p = @"}";
-
- string p = @"}";
- string p = @"}";
- string s = "xzc abc(s \"(abc)\")); dfg()";
- }
-
- public static string hello(string s, string p)
- {
- string fullMatch = match.Value;
- }
- }
- public class zz
- {
- public static void Main()
- {
- string s = "xzc abc(s \"(abc)\")); dfg()";
- string p = @"}";
- }
-
- public static string hello(string s, string p)
- {
- string fullMatch = match.Value;
- }
- }
- '@
复制代码 |