This regular expression strictly matches an IPv4 address. Leading 0 are not matched , take a look at test strings and try your own ones.