**asdfasdfsafsafhaisodfasoifhsa@@ 使用正则表达式怎么匹配?

vicon 2006-01-07 10:35:54
中间的字符里面有换行的。
谢谢! 立等结贴。
...全文
69 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
止戈而立 2006-02-15
  • 打赏
  • 举报
回复
Regex reg=new Regex(@"(?<=\*\*).*?(?=@@)",RegexOptions.Singleline);
string output=reg.Match(input).Value;
linuxyf 2006-01-07
  • 打赏
  • 举报
回复
bool FoundMatch = false;
try {
FoundMatch = Regex.IsMatch(SubjectString, "(?s)\\*\\*.*@@");
} catch (ArgumentException ex) {
// Syntax error in the regular expression
}

110,538

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧