Regex expression for validating IPv4
regex ipv4 ( " ( ( [ 0-9 ] ▁ [ 1-9 ] [ 0-9 ] ▁ 1[0-9 ] [ 0-9 ] ▁ 2[0-4 ] [ 0-9 ] ▁ 25[0-5 ] ) \\ . ) { 3 } ( [0-9 ] ▁ [ 1-9 ] [ 0-9 ] ▁ 1[0-9 ] [ 0-9 ] ▁ 2[0-4 ] [ 0-9 ] ▁ 25[0-5 ] ) " ) ;