Py学习  »  Python

Python-使用带位置的正则表达式提取和拆分字符串

TheDataGuy • 2 年前 • 523 次点击  

我有一根这样的绳子。

'2022-05-08T04:18:43Z UTC [ db=dev user=test pid=1073922359 userid=100 xid=2063 ]' LOG: alter table my_table alter column string type varchar(16);

我想使用正则表达式提取以下项。我试了几下,但都不管用。

2022-05-08T04:18:43Z -时间戳

dev -数据库名称

test -数据库用户

alter table my_table alter column string type varchar(16) -询问

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/133914
 
523 次点击  
文章 [ 1 ]  |  最新文章 2 年前