◆如何取E-mail地址的用户名◆ 请教如何取E-mail地址@前所有的字符(即邮件的用户名称)如:[email protected] 取username;[email protected] 取lily等等.谢谢! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 void Main(){ string name=GetMailUserName("[email protected]");}string GetMailUserName(string email){ return Regex.Replace(email,@"^(.+)@.+$","$1");} string [email protected]int endi=strE.indexof("@");string Username=strE.substring(0,endi-1);Response.Write(username);结果:username 菜鸟求助,第一次做WinForm iframe动态显示页面 根据条件查询出的结果绑定到datagridview中(3层架构 winform) 点击GridView中的按钮’ ListView选定项的问题 printdocument 的分页打印 C# SQL 事务问题,求大神!! MDI的聊天程序如何在收到消息后自动弹出子窗口 如何解除邦定 谈谈学习C#的感想 求老师请教,如果在当前线程中访问在主线程中的控件. 懂 xml 的进来打一架?
void Main(){
string name=GetMailUserName("[email protected]");
}
string GetMailUserName(string email){
return Regex.Replace(email,@"^(.+)@.+$","$1");
}
int endi=strE.indexof("@");
string Username=strE.substring(0,endi-1);
Response.Write(username);结果:username