This regex can be used for parsing simple math terms. You can use this operations: + - * / For example: 1+2 1.9/8.9 -810.123-98 810*(-1.12)