weixin_39988888的博客我得到了这样的格式的字符串:1"Wilbur Smith (Billy, son of John), Eddie Murphy (John), Elvis Presley, Jane Doe (Jane Doe)"因此从根本上讲,它是演员姓名的列表(可选地,其后是括号中的角色)。 角色本身可以...
我一的博客如果有递归嵌套表达式,可以在逗号上拆分,并验证它们是否与pyparsing匹配:import pyparsing as ppdef CommaSplit(txt):''' Replicate the function of str.split(',') but do not split on nested expressions or ...
weixin_39772388的博客我有一串这样的格式:"Wilbur Smith (Billy, son of John), Eddie Murphy (John), Elvis Presley, Jane Doe (Jane Doe)"所以基本上它是演员名字的列表(可选的后面是他们在括号中的角色)。角色本身可以包含逗号(演员...