分割编码字符

时间:2018-06-26 11:35:48

标签: python regex

我有以下字符串: 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)的上进行拆分

0 个答案:

没有答案