W
W
WebAnalytics12017-12-26 12:56:05
Regular Expressions
WebAnalytics1, 2017-12-26 12:56:05

Have I made the regular expressions correctly?

Hello, I need to block


172.16.31.0-255
172.16.32.0-255
172.16.33.0-255
172.16.34.0-255
172.16.36.0-255
172.16.239.0-255
172.16.39.0-255

^172\.16\.3[6-9]|4[69]|239\.\d*$

172.16.42.0-255
172.16.198.0-255
172.16.60.0-255
172.16.91.0-255
172.16.77.0-255
172.16.84.0-255
172.16.61.0-255

^172\.16\.42|198|60|91|77|84|61\.\d*
$

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2017-12-26
@WebAnalytics1

^172\.16\.3[6-9]|4[69]|239\.\d*$
Note that your alternatives
Correct syntax: 172\.(ab|c|de)
Rewrite using groupings.

F
Farhod Daniyarov, 2017-12-26
@fudeglan

try it
IP addresses like
172.16.31.0
172.16.31.100
172.16.31.255
will be blocked

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question