How can I grab comma delimited values that appear after a term I searched for?

前端 未结 2 1231
醉话见心
醉话见心 2021-01-25 21:01

Here\'s my code so far:

public void DeserialStream(string filePath)
    {
        using (StreamReader sr = new StreamReader(filePath))
        {
            str         


        
2条回答
  •  猫巷女王i
    2021-01-25 21:12

    You can use a regex like this:

    \"DataType\"\,\"(?:Count|Net)\"((?!\"DataType\").)*
    

    This would match the DataType line all the way to the next DataType line.

提交回复
热议问题