正则表达式1:\b(([01]?\d\d?|2[0-4]\d|25[0-5])(\.|\b)){4}\b
正则表达式2:\b(([01]?\d\d?|2[0-4]\d|25[0-5])(\.|$)){4}\b
示例字符串:
123.105.114.142
010.000.000.011
240.000.000.240 121.122.221.123 224.152.255.152
240.345.334.123
..@102.021.031.246@@@@@@02.021.031.246@@@@..@
255.255.251.255
10.1.1.2
23.124.23.144#
Regex 1能够从示例字符串中获取所有IP地址。我的问题是为什么正则表达式2不能这样做?