社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Python

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

TheDataGuy • 3 年前 • 1347 次点击  

我有一根这样的绳子。

'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
 
1347 次点击  
文章 [ 1 ]  |  最新文章 3 年前