- 博客(3)
- 收藏
- 关注
原创 使用正则表达式匹配没有协议的简单URL
$text = 'Shor: zxc.abc.me/QQQ/dsa23 Unlock more episodes for free'; // 使用正则表达式匹配没有协议的简单URLpreg_match('/\b[a-z0-9.-]+\.[a-z]{2,}\/?[a-z0-9._?~\/#@&%=-]*[a-z0-9_?#\/=-]*\b/i', $text, $matches); // 由于这个正则表达式可能会匹配到文本中的其他类似结构的字符串(比如电子邮件地址),// 我们可能需要进一
2024-12-02 15:15:55
419
原创 python3使用websocket-clien库报错has no attribute ‘enableTrace‘
python3使用websocket-client库报错has no attribute ‘enableTrace’解决方案:第一步:使用正确的库 pip install websocket-client安装完成后直接使用import websocketdef on_message(ws, message): print(ws) print(message) def on_error(ws, error): print(ws) print(error)d
2020-10-14 17:28:49
2248
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅
1