html查找网址,用于查找特定网址的正则表达式,包括<a href..> html tag

这篇博客探讨了如何从 Jenkins 构建日志中解析特定 URL 和 Run ID,作者分享了尝试使用正则表达式的经历,并询问了关于优化正则表达式以进行高效搜索的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

10:16:02 2016-08-10 10:16:01.087 [INFO] (1): DEVICE_DAILY_SKIPS_SUBSCRIBER=60

10:16:02 2016-08-10 10:16:01.087 [INFO] (1): DEVICE_DAILY_SKIPS_REGISTERED=48

10:16:02 2016-08-10 10:16:01.088 [INFO] (1): DEVICE_HOURLY_STATION_SKIPS_SUBSCRIBER=6

10:16:02 2016-08-10 10:16:01.284 [INFO] (1): Post results =true

10:16:02 2016-08-10 10:16:01.290 [INFO] (1): Calling Api......

10:16:05 2016-08-10 10:16:04.289 [INFO] (1): Run URL = Run = R2435

10:16:05 2016-08-10 10:16:04.293 [INFO] (1): [CONFIGURATION BeforeSuite] AbstractBaseTest#setUpBeforeSuite

10:16:05 2016-08-10 10:16:04.307 [INFO] (1): SHORT_TIMEOUT: 1000

Above is the Jenkins build console log and I am in the process of parsing it to find the desired URL along with the enclosing Run = R2435 with the help of Regular Expressions.

Here is what I have tried:

but does not seem to work. Also, is there a way to have a little compact regular expression for such kind of this search? How to find such URLs in the logs with the help of regex?

+0

You are aware of that the '?' is a special character in regular expressions? So are dots. –

+0

what about '()'? –

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值