Convert result of matches from regex into list of string

后端 未结 6 890
余生分开走
余生分开走 2020-12-14 15:22

How can I convert the list of match result from regex into List? I have this function but it always generate an exception,

6条回答
  •  清歌不尽
    2020-12-14 15:44

    Here's another solution that will fit into your code well.

    while (_matchList.Success)
    {
        _returnValue.Add(_matchList.Value);
        _matchList = _matchList.NextMatch();
    }
    

提交回复
热议问题