Split string based on a regular expression

后端 未结 4 1863
我寻月下人不归
我寻月下人不归 2020-11-27 12:26

I have the output of a command in tabular form. I\'m parsing this output from a result file and storing it in a string. Each element in one row is separated by one or more w

4条回答
  •  死守一世寂寞
    2020-11-27 13:12

    When you use re.split and the split pattern contains capturing groups, the groups are retained in the output. If you don't want this, use a non-capturing group instead.

提交回复
热议问题