hello everyone
I am trying to make a program which identify the format and only take the specific data for example if user enter the format such reg:12345 data:678923. The program will identify the format and gives the results as a=12345 and b=678923 and if the format is wrong it will give the error message. The program will also ask to again to the user to enter the format or not(looping) if user do not want to enter the format(data) the program will have to terminate. please help at this.
thanks in advance.
I'm not sure how familiar you are with std::regex, so rather than going through the construction of the regex object step-by-step I'll refer you to a starting link to get you started in case you're interested in pursuing this approach: http://www.cplusplus.com/reference/regex/ECMAScript/
Have a look above and anywhere else your searches take you and then come back here if something is still unclear
thanks its helps
but there is change to do such as the output must be in this a=12345 and b=678923.
the program ends at success and fail step. I need success and fail step also.
And i can use "using namespace std; " to remove "std::" from the program right
It appears the previous 2 posts have been reported - could the person who reported them please state what s/he found so offensive in them? As was made clear in my reply to OP nobody was doing their homework for them (hence any explanation behind the regex object was deliberately held back) but offering them an exploratory path to investigate, via the link provided, and then come back here with further queries if any