0

We have the docker tags with below versions, please help to share the regex pattern to filter the records that is older than below values for example should show old tags = 123.0.0.187 and older, 123.0.0.187_acme.187.xxxxxxx and older, likewise for others ?

123.0.0.188
123.0.0.188_acme.188.xxxxxxx
123.1.0.141
123.1.0.141_acme.141.xxxxxxx

I am following this instruction how to match a number which is less than or equal to 100?

Regex tried :

\b(.[0-9]+\.[0-9]+\.[0-9]+\.?|188)\b
\b(.[0-9]+\.[0-9]+\.[0-9]+\.?|141)\b
hare krshn
  • 176
  • 1
  • 4
  • 16

1 Answers1

0

Try this

^([0-9]+\.){3}(([1-9]{1}[0-8][0-7])|[0-9]{2})(_.+)?$

regexr.com/798l9

Ana Lívia
  • 95
  • 2
  • 10