链接在最后变得破碎 [英] Link gets Broken at the end
本文介绍了链接在最后变得破碎的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好!
我希望你能帮助我 - 似乎是一个涉及字符串操作的简单修复......
I hope you can help me - seems like a simple fix involving string manipulation...
这里在我的代码粘贴到html的Body后,我的链接是什么样子。
Here is how my link looks like after getting pasted by my code to the Body of the html.
https://smartmeeting.co.il/meeting.php?meetingId= 487
以下是我的一小部分代码:
Here is my small bit of code responsible for it:
string extractNumbers = sm.meetingURL.Substring(sm.meetingURL.LastIndexOf('=')+1);
string extractLink = sm.meetingURL.Substring(0, sm.meetingURL.LastIndexOf('='));
StringBuilder sBuilder = new StringBuilder();
sBuilder.Append(extractLink);
sBuilder.Append('=');
sBuilder.Append(extractNumbers);
olMeeting.Body = staticText + Environment.NewLine + sBuilder.ToString() + Environment.NewLine;
任何人有想法吗?
推荐答案
我不喜欢正则表达式,但这才是真正的方法。通过这种方式,您在尝试和尝试时会失去无尽的时间。
I dislike the regular expression, but that is really the way to go here. With this way you lost endless time with trying and trying.
有一个工具。
There is a tool for that.
http://www.ultrapico.com/expresso.htm
这篇关于链接在最后变得破碎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文