在python3.7的regex内置中使用Unicode块(\p{InBasic\u Latin})来匹配规范等价物的可能性

2024-09-30 01:32:28 发布

您现在位置:Python中文网/ 问答频道 /正文

为了编写一个较短的正则表达式和精确的正则表达式,我想知道使用unicode块的可能性,如here所示。你知道吗

当我尝试将'\p{InBasic_Latin}'与regex内置一起使用时,问题是返回的错误re.error: bad escape \p at position ...

有没有可能在python3.7的regex中使用unicode块?你知道吗


Tags: rehere错误unicodepositionerror可能性内置

热门问题