baiy / Ctool

程序开发常用工具 chrome / edge / firefox / utools / windows / linux / mac
https://ctool.dev
MIT License
1.47k stars 208 forks source link

正则表达式 #273

Closed sunzhengbo closed 1 year ago

sunzhengbo commented 1 year ago

^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?).){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$

这样的表达式无法校验192.168.1.1

baiy commented 1 year ago
image

我这边测试可以使用

sunzhengbo commented 1 year ago

谢谢,可以了,可能是表达式的结尾存在换行符才导致的