V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  ghostsimon  ›  全部回复第 3 页 / 共 3 页
回复总数  59
1  2  3  
2019-03-28 19:26:17 +08:00
回复了 kba977 创建的主题 全球工单系统 [求助]手机号莫名其妙被别人注册, 这种情况怎么办
估计填手机号的时候填错了一位发到你手机上了,我注册的时候经常填错一位,等半天没验证码来,仔细一看发到别人手机上了。
2019-03-22 17:03:16 +08:00
回复了 notgood 创建的主题 程序员 正则表达式太难了 ..怎么破
@notgood
可能你写的正则表达式不对吧,没看懂你正则里面的%(__prefix_line)s 是什么意思,分组的话,(.+)就可以了。
2019-03-22 10:10:31 +08:00
回复了 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-03-22 10:07:35 +08:00
回复了 notgood 创建的主题 程序员 正则表达式太难了 ..怎么破
^\w+\s+\d+ \d+:\d+:\d+\s+(.+)\s+ERROR:\s+failed to handshake with <HOST>: authentication error$
https://regex101.com/
可以测试通过
2019-03-15 17:13:48 +08:00
回复了 crazyjin 创建的主题 Python Python 社区是啥子隐秘的高端会所吗?
telegram 组群挺热闹的。
2019-03-15 14:48:05 +08:00
回复了 czthebest 创建的主题 分享发现 推荐一个台湾广播节目
@restlessdream
请记录,第一组:2387 1290 7785 4459......
2019-03-08 10:37:09 +08:00
回复了 a7217107 创建的主题 Java 数据库单表数据量过大
@saltxy 用的其他厂家的数据库平台,看日志和报错应该是用 mycat,但是肯定有不少二次开发。具体技术细节就不清楚了。
2019-03-07 22:15:26 +08:00
回复了 a7217107 创建的主题 Java 数据库单表数据量过大
单表 30 亿,分库,根据时间分表,运行的还不错。
2019-02-27 20:36:49 +08:00
回复了 w2exzz 创建的主题 程序员 请大家给我点信心.....
@lijunbo 和宪法比起来,刑法都是小钱。
2019-02-08 17:22:20 +08:00
回复了 v2byy 创建的主题 随想 我妈说不生娃要跟我断绝关系
爱要不要吧,别后悔就行。真不要也不太可能断绝关系。不想要要了才真是对孩子不负责。
2019-01-31 09:46:53 +08:00
回复了 hiwcj 创建的主题 程序员 今天 8.8.8.8 是不是有问题?
不是早都被运营商旁路抢答了吗
2019-01-29 17:47:08 +08:00
回复了 GjriFeu 创建的主题 北京 北京有什么特产带回去 ...
@GjriFeu 四季民福烤鸭外卖带走,但是最好当天吃了。不知道你路多远,路程太长就不好了。
2019-01-24 11:15:00 +08:00
回复了 enginex 创建的主题 职场话题 什么类型的公司加班相对少一些
@Justin13
最后一项可以去掉的。
2019-01-16 08:39:21 +08:00
回复了 Unfair 创建的主题 Alienware 想买个外星人笔记本怎么样。
玩家国度考虑一下。
基于 snmp 协议的设备管理和告警管理。
1  2  3  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3427 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 34ms · UTC 11:22 · PVG 19:22 · LAX 04:22 · JFK 07:22
Developed with CodeLauncher
♥ Do have faith in what you're doing.