我想从一个投入短语中引出所有两句,并保留不匹配的内容作为言词。
请允许我说,“销售人员”信息技术,希望产出:
sales people
IT
“SO”营销“管理”
产出如下:
SO
sales manager
marketing
management
如果投入=“SO”“销售管理”保险
产出如下:
SO
sales manager
marketing
management
insurance
I have found the regex :but i don t know how to extract:
string InputText="SO "sales manager" marketing "management"" ;
string pattern0 = "^"(.*?)"$";
string pattern = "^(.*?)"(.*?)"(.*?)$";
Regex regex = new Regex(pattern);
string[] temOperands;
bool isMatch = regex.IsMatch(InputText);
if (isMatch)
{
//here goes the extraction
}