💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
![](https://img.kancloud.cn/89/2a/892acc57561c590fadf9fb684192bfab_455x131.png) ~~~python import re s = "154363" res = re.match("3", s) # 从头开始匹配 res2 = re.search("3", s) # 全局搜索 res3 = re.findall("3", s) # 全部取出 print(res) # None print(res2) # <re.Match object; span=(3, 4), match='3'> print(res3) # ['3', '3'] ~~~ ![](https://img.kancloud.cn/e9/0f/e90f0c1d0a573ae77cbd481558df7dac_530x133.png)