为什么regex.split不与$分割 [英] Why regex.split not splits with $
本文介绍了为什么regex.split不与$分割的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Regex.Split将我的字符串拆分为:
i am using Regex.Split to split my string as:
string str = "12$34$45";
string [] result= Regex.Split(str,"$");
但它不是拆分..当我尝试按#拆分时,它可以工作.
我尝试过的事情:
but it is not splitting ..When i tried splitting by # then it works.
What I have tried:
string str = "12$34$45";
string [] result= Regex.Split(str,"$");
推荐答案
34
45" ; 字符串 [] result = Regex.Split(str,"
45"; string [] result= Regex.Split(str,"
");
");
但它不是拆分..当我尝试按#拆分时,它可以工作.
我尝试过的事情:
but it is not splitting ..When i tried splitting by # then it works.
What I have tried:
string str = "12
这篇关于为什么regex.split不与$分割的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文