标签: c# regex data-structures
我在浏览将中缀表达式转换为后缀的代码时遇到了以下行。
string pattern = @"(?<=[^\\.a-zA-Z\\d])|(?=[^\\.a-zA-Z\\d])"
无法得到什么&#34; \\&#34;在转换类似((a+(b*(f/c)))-e) to abfc/*+e-
((a+(b*(f/c)))-e) to abfc/*+e-
答案 0 :(得分:0)
当值被分配给字符串时,它将变为\.,这意味着您正在寻找.
\.
.
正则表达式.匹配任何字符,而\.字面上将匹配.个字符。