什么是正规表达式模式,以实现以下任务如何使用正则表达式解析数据
数据格式(模式)
anyword:anycharcters;
样品输入
msg:"c# 6.0 is good";sid:201;classtype:object oriented;.net,ado.net,other messages
预期输出(匹配组)
msg:"c# 6.0 is good"; ----------> 1
sid:201;--------------------->2
classtype:object oriented;---------->3
[String.split](HTTPS://msdn.microsoft.com/en-us/library/system.string.split \(V = vs.110 \ ).aspx)可能比钻研正则表达式更容易。 –