I am having 3 input boxes in my webform and I want to validate all fields using javascript regex while submitting form.

Format for my fields are as follows:

```
NNNN.NN.NNNN (i.e. 1234.56.7890) 

NNN.N (i.e. 123.4) 

NNNNNNN-NNN (i.e. 1234567-890)

```

where N is number or digit only.

Any help would be appreciated.