Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
您需要将其与 unicode 标志一起使用,如下所示:
m = re.findall(r'\[\d+\] – \[\d+\]', body, re.UNICODE)
这应该[20] – [22]从您指定的字符串返回。
[20] – [22]