好的,我正在对一些字符串进行unicode正则表达式匹配。在
这些是有问题的弦。不是两条分开的线,而是两条分开的线。在
\u2018Mummy\u2019 Reboot May Get \u2018Mama\u2019 Director
\u2018Glee\u2019 Star Grant Gustin to Play The Flash in \u2018Arrow\u2019 Season 2
我使用这个正则表达式来解析出以unicode引号括起来的标题。在
^{pr2}$使用正则表达式findall()还我
['u2018Mama\\u2019']
以及
['u2018Glee\\u2019', 'u2018Arrow\\u2019']
这就引出了两个我想不通的问题。为什么不返回\u2018,首字母在哪里?在
第二,有什么不同。我看不见。最后,我将\u2018和\u2019替换为'。 然后使用这个正则表达式。在
re.compile("'[^']*'")
它在两个字符串中都匹配。这有什么区别?unicode正则表达式中缺少什么?在
提前谢谢你。在
[u'\u2018mmy\u2019',u'\u2018Mama\u2019',u'\u2018Glee\u2019',u'\u2018Arrow\u2019']
相关问题 更多 >
编程相关推荐