更新时间:2022-11-12 09:02:31
您的测试字符串:
周日周一100
匹配结果:
星期一星期一100
匹配组:
1.星期天
2.星期一
3. 100
我想要的Rubular.com是:
您的测试字符串:
周一周一100
比赛结果:
星期一星期一100
比赛分组:
1 。星期日100
任何快速帮助都将受到高度赞赏。
谢谢,
Simran
我的尝试:
(^。*) - ?(星期一)(。*)
Your test string:
Sunday Monday100
Match result:
Sunday Monday100
Match groups:
1. Sunday
2. Monday
3. 100
What I want in Rubular.com is:
Your test string:
Sunday Monday100
Match result:
Sunday Monday100
Match groups:
1. Sunday100
Any quick help will be highly appreciated.
Thanks,
Simran
What I have tried:
(^.*)-?(Monday)(.*)
但是这给了我输出
1.星期天
2.星期一
3. 100
but this gives me output as
1. Sunday
2. Monday
3. 100
您确定不需要SPACE吗?
HYPHEN应该是空格吗?
Are you sure you don't need the SPACE?
Is that HYPHEN supposed to be a SPACE?
System.Console.WriteLine ( System.Text.RegularExpressions.Regex.Replace ( "Sunday Monday100" , "(^.*)-?(Monday)(.*)