小编use*_*564的帖子

如何匹配IPv4地址

我想让我的正则表达式匹配以下内容:

169.254.0.0-169.254.254.255
Run Code Online (Sandbox Code Playgroud)

有谁可以帮助我如何实现这一目标.

到目前为止我有这个:

169\.254\.([1-9]{1,2}|[1-9]{1,2}[1-4])
Run Code Online (Sandbox Code Playgroud)

但它也会拿到169.254.255.1,这不应该是其中一个比赛.

请帮忙!

谢谢

regex posix ip-address

2
推荐指数
1
解决办法
2147
查看次数

标签 统计

ip-address ×1

posix ×1

regex ×1