V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  ghostsimon  ›  全部回复第 4 页 / 共 5 页
回复总数  84
1  2  3  4  5  
2019 年 4 月 29 日
回复了 mason961125 创建的主题 天黑以后 20190429 午夜俱乐部
等正道潜龙作者半夜爆更。
2019 年 4 月 26 日
回复了 soarscnu 创建的主题 剧集 推荐我们与恶的距离
在哪儿看,有没有资源?
蒙面之城
2019 年 4 月 9 日
回复了 rrubick 创建的主题 问与答 请教婴幼儿耳温枪哪款好?博朗还是欧姆龙?
@magic3584 等孩子生病了,还是得用水银的。
估计填手机号的时候填错了一位发到你手机上了,我注册的时候经常填错一位,等半天没验证码来,仔细一看发到别人手机上了。
2019 年 3 月 22 日
回复了 notgood 创建的主题 程序员 正则表达式太难了 ..怎么破
@notgood
可能你写的正则表达式不对吧,没看懂你正则里面的%(__prefix_line)s 是什么意思,分组的话,(.+)就可以了。
2019 年 3 月 22 日
回复了 notgood 创建的主题 程序员 正则表达式太难了 ..怎么破
# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility

import re

regex = r"^\w+\s+\d+ \d+:\d+:\d+\s+(.+)\s+ERROR:\s+failed to handshake with <HOST>: authentication error$"

test_str = "Aug 15 08:59:07 <hostname> ss-server[1382]: 2018-08-15 08:59:07 ERROR: failed to handshake with <HOST>: authentication error"

matches = re.finditer(regex, test_str, re.MULTILINE)

for matchNum, match in enumerate(matches, start=1):

print ("Match {matchNum} was found at {start}-{end}: {match}".format(matchNum = matchNum, start = match.start(), end = match.end(), match = match.group()))

for groupNum in range(0, len(match.groups())):
groupNum = groupNum + 1

print ("Group {groupNum} found at {start}-{end}: {group}".format(groupNum = groupNum, start = match.start(groupNum), end = match.end(groupNum), group = match.group(groupNum)))

# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
2019 年 3 月 22 日
回复了 notgood 创建的主题 程序员 正则表达式太难了 ..怎么破
^\w+\s+\d+ \d+:\d+:\d+\s+(.+)\s+ERROR:\s+failed to handshake with <HOST>: authentication error$
https://regex101.com/
可以测试通过
2019 年 3 月 15 日
回复了 crazyjin 创建的主题 Python Python 社区是啥子隐秘的高端会所吗?
telegram 组群挺热闹的。
2019 年 3 月 15 日
回复了 czthebest 创建的主题 分享发现 推荐一个台湾广播节目
@restlessdream
请记录,第一组:2387 1290 7785 4459......
2019 年 3 月 8 日
回复了 a7217107 创建的主题 Java 数据库单表数据量过大
@saltxy 用的其他厂家的数据库平台,看日志和报错应该是用 mycat,但是肯定有不少二次开发。具体技术细节就不清楚了。
2019 年 3 月 7 日
回复了 a7217107 创建的主题 Java 数据库单表数据量过大
单表 30 亿,分库,根据时间分表,运行的还不错。
2019 年 2 月 27 日
回复了 w2exzz 创建的主题 程序员 请大家给我点信心.....
@lijunbo 和宪法比起来,刑法都是小钱。
2019 年 2 月 8 日
回复了 v2byy 创建的主题 随想 我妈说不生娃要跟我断绝关系
爱要不要吧,别后悔就行。真不要也不太可能断绝关系。不想要要了才真是对孩子不负责。
2019 年 1 月 31 日
回复了 hiwcj 创建的主题 程序员 今天 8.8.8.8 是不是有问题?
不是早都被运营商旁路抢答了吗
2019 年 1 月 29 日
回复了 GjriFeu 创建的主题 北京 北京有什么特产带回去 ...
@GjriFeu 四季民福烤鸭外卖带走,但是最好当天吃了。不知道你路多远,路程太长就不好了。
1  2  3  4  5  
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   2699 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 35ms · UTC 12:30 · PVG 20:30 · LAX 04:30 · JFK 07:30
♥ Do have faith in what you're doing.