I want true for these cases:
.123
.000
.999
And want false for these cases:
123
a123
.123a
.1234
a.123
This is my current regex:
match, _ := regexp.MatchString("[.]{1}[0-9]{3}", ".123a")
fmt.Println(match)
But this pattern doesn't return false
for:
.123a
.1234
a.123
What is the correct regex?