我有以下字符串:
product_details
= Alton Miller – Nu Forms - Vinyl, 12"
我希望将其分为以下
['Alton Miller', 'Nu Form', 'Vinyl, 12"']
因为字符串中有两种破折号(–
和-
)
我使用re.split的方法如下
deets = re.split(" - |, \u200e\u2013 |",product_details)
给出以下输出。
[u'Alton Miller \u200e\u2013 Nu Forms', u'Vinyl, 12"']
如何在代表非标准破折号(\u200e\u2013
)的–
上进行拆分