# -*- coding: utf-8 -*-
"""
Created on Sun Jul 26 23:19:32 2015
@author: lijiong
"""
import re
path = 'C:/Users/lijiong/Desktop/qq_number.txt'
file_qq = open(path)
for line in file_qq.readlines():
m = re.match(r'[1-9][0-9]{5,9}\@\q{2}\.\c\o\m', line)
if m: # match successfully
print m.group()
terms = m.group().split('@')
print terms[0]利用正则表达式提取qq号
最新推荐文章于 2026-02-18 00:35:18 发布
本文介绍如何使用正则表达式从文本中提取QQ邮箱地址,并解析出用户名部分。
7464

被折叠的 条评论
为什么被折叠?



