以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  求正则写法  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=177811)

--  作者:as2565929355
--  发布时间:2022/6/6 9:32:00
--  求正则写法
要判断1段字符串1.5+0.2+1.4   要判断+号出现的次数,之前的写法是用的Split分割数组,然后再判断数组的长度,现在想尝试用正则表达式写法,求代码
--  作者:有点蓝
--  发布时间:2022/6/6 9:41:00
--  
网上搜呗,比如:https://blog.csdn.net/qq_38974638/article/details/112686062

Output.Show(System.Text.RegularExpressions.Regex.Matches("1.5+0.2+1.4","\\+").Count)