寻找关注sceaio的正则表达式解决方案:
我有字符串,我必须在大写的基础上拆分,但连续的大写部分不应该拆分.
例如:如果输入是
DisclosureOfComparativeInformation
Run Code Online (Sandbox Code Playgroud)
O/p应该是
Disclosure Of Comparative Information
Run Code Online (Sandbox Code Playgroud)
但连续的大写不应该分裂.
GAAP不应该导致G A A P.
如何找到特定的图案并插入空间?
感谢名单
试试 -
var subjectString = "DisclosureOfComparativeInformation";
var resultString = Regex.Replace(subjectString, "([a-z])([A-Z])", "$1 $2");
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2444 次 |
| 最近记录: |