|
|
1
3
下面将介绍这个技巧。假设字符串在最后一次匹配之后结束。
|
|
|
2
2
Assuming you can guarantee the input format, and it's just the last entry you want,
|
|
|
3
0
使用string.split():
Edit: the array will have the string inside [] and then . and so on, so if you have a variable number of groups, you can use that to get the value you want (or remove the strings that are just '.') 编辑后将反斜杠添加到分隔符,以处理类似'\[abc\] edit2:对于嵌套的[]:
您在最后一个元素(索引3)中的[匹配]必须删除多余的] |
|
|
4
0
您有几个选项:
工具书类 |
|
|
A B · C#Excel自动调整列避免长文本时出错 1 年前 |
|
|
Megrez7 · C#ToArray转换合并为一行,导致数组元素更改 1 年前 |
|
Aycon · 在工厂方法中释放部分创建的对象的正确方法是什么? 1 年前 |
|
|
Sei · Avalonia/WPF将路由器传递到控制模板 1 年前 |