Hi Depashikha,
This regex may be of help,
^\d+(\.\d+)?$
Let me know, if you have any issues,
Hope it helps