I've tweaked a little bit a solution I did for the regex101 quiz and I came up with this solution: DEMO
^[.,]?(\d)*([.,](\d+)?)?((?:e[+-]?|[+-]e)*\d+(\.\d+)?)?\.?$
EDIT: A secon approach since the explanation of the question wasn't clear.
Final answer edited and accepted: ^\.?\d*(\.(\d+)?)?((?:e[+-]?|[+-]e)*\d+(\.\d+)?)?\.?$