📌  相关文章
📜  python 正则表达式在字符之前获取字符串 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:33.665000             🧑  作者: Mango

代码示例1
You don't need regex for this

>>> s = "Username: How are you today?"
You can use the split method to split the string on the ':' character

>>> s.split(':')
['Username', ' How are you today?']