"(0|1)+" - recognisez binary numbers only, where 0 0r 1 must occur atleast once e.g
0,1,111,100101011 etc.
"0(x|X)[0-9a-fA-F]+" - recognizes hexadecimal numbers only, but the must begin with the
sequence 0X or 0x , but you can chenge that if it isn't a requirement for you
i am receiving this message: ||=== Build: Debug in reall (compiler: GNU GCC Compiler) ===|
C:\Program Files (x86)\CodeBlocks\MinGW\lib\gcc\mingw32\5.1.0\include\c++\bits\c++0x_warning.h|32|error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.|
C:\Users\dell\Documents\reall\main.cpp||In function 'int main()':|
C:\Users\dell\Documents\reall\main.cpp|7|warning: extended initializer lists only available with -std=c++11 or -std=gnu++11|
C:\Users\dell\Documents\reall\main.cpp|7|error: in C++98 'data' must be initialized by constructor, not by '{...}'|
C:\Users\dell\Documents\reall\main.cpp|9|error: 'regex' is not a member of 'std'|
C:\Users\dell\Documents\reall\main.cpp|18|error: 'regex_match' is not a member of 'std'|
C:\Users\dell\Documents\reall\main.cpp|18|error: 'bin_obj' was not declared in this scope|
C:\Users\dell\Documents\reall\main.cpp|31|error: 'regex_match' is not a member of 'std'|
C:\Users\dell\Documents\reall\main.cpp|31|error: 'hexa_obj' was not declared in this scope|
||=== Build failed: 7 error(s), 1 warning(s) (0 minute(s), 0 second(s)) ===|
error This file requires compiler and library support for the ISO C++ 2011 standard.
i'd advice you to get an up to date compiler, able to support all the new language features, unless you are forced to use c98 compiler probably for code compatibility.