Q:

Regular expression for calculator with decimal point

I am making a calculator application and want to validate my input in the form:
operand operator operand 

These operands may also contain decimal points.  I am not able to make a regular expression for it.  I have tried this expression:
@"^[-+]?(\\.[0-9])+([-+*/]+[-+]?(\\.[0-9])+)*$"

But this is not working.  Can anyone suggest solution for it? 

A:

Check this regular expression, this will works. 
^[-+]?([0-9]+)[\\.0-9]+[-+*/+][-+]?([0-9]+)[\\.0-9]*$

Also if you want to make change in future below link is a good tool to test regular expression. 
https://www.debuggex.com/

