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

I am using C++ regex (regular expressions) and maps to find how

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!