I'm currently writing a validator where I need to check the formats of floats. My code reads in a format of (x,y) where x is the total possible digits in the float and y is the maximum digits out of x that can be after the decimal point. Apologies if this question has already been answered before, but I wasn't able to find anything similar. 

For example, given a format of (5,3):

Valid values

```
55555
555.33
55.333
5555.3
.333

```

Invalid values

```
55555.5
555555
5.5555
.55555

```

This is my first time working with regex so if you guys have any tutorials that you recommend, please send it my way!