1

【笔记】Python3 通过正则表达式替换子串

 10 months ago
source link: https://loli.fj.cn/2023/07/07/Python3%E9%80%9A%E8%BF%87%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F%E6%9B%BF%E6%8D%A2%E5%AD%90%E4%B8%B2/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

【笔记】Python3 通过正则表达式替换子串

2023-07-07

Python3 通过正则表达式替换子串

通过正则表达式替换子串

import re

result = re.sub("正则表达式", "替换后的子串", "原本的父字符串")

CSDN——wjs30078111


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK