错在哪里

[复制链接]
 楼主| limee 发表于 2020-3-11 22:13 | 显示全部楼层 |阅读模式
#!/usr/bin/python

import re
str = "this is string ?example....wow!!! this is really string";
print re.sub(r'^?.','',str);

我想删除?开始后面的全部字符,用正则的方法,
报错无法运行。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

301

主题

475

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部