gpt4 book ai didi

用于匹配 url 的 Ruby 正则表达式

转载 作者:数据小太阳 更新时间:2023-10-29 06:28:42 24 4
gpt4 key购买 nike

<分区>

Possible Duplicates:
Regex to match URL
regex to remove the webpage part of a url in ruby

我正在寻找一个正则表达式来解析文件中的所有 url。
我尝试了谷歌搜索后得到的许多正则表达式,但在一种或另一种情况下都失败了。我的想法是写一个在开始时检查 http 或 https 的存在,它会匹配所有内容,直到它看到一个空格。
有什么想法吗?
注意:我不需要解析 url,但需要从文件中删除所有 url,或者至少使其不可读。

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com