在d之后添加空格的Python正则表达式

2024-04-20 08:47:28 发布

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

如何使用re在Python中编写一个正则表达式来查找模式:

dot "." followed directly by any char [a-zA-Z] (not space or digit)

然后在点和字符之间加一个空格?

str="Thanks.Bob"
newsttr="Thanks. Bob"

提前谢谢你, 兹维


Tags: orreby模式notanyspacedot