Question: I am using C++ regex (regular expressions) and maps to find how may times a number(decimal number) repeats in the file. In my file if
I am using C++ regex (regular expressions) and maps to find how may times a number(decimal number) repeats in the file. In my file if have -2.6 and -2.60 and I want them to be considered same (for both -25.6 and 25.60 should be considered same number) also if there is a number e.g +2 and 2 they both should be considered same.
I am using "^[+-]?[0-9]+(\\.[0-9]+)?$" for decimal numbers and "^[+-]?[0-9]+$" for integers

Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
