Regular expressions are not supported in the standard C + + libraries, so third-party libraries are required to support them. I'm using the GNU Regex Library.
The language of the regular expression link: https://msdn.microsoft.com/zh-cn/library/ae5bf541 (vs.80). aspx.
The following are the steps to import in Codeblocks:
1. Open: http://gnuwin32.sourceforge.net/packages/regex.htm;
2. Select "Complete package, except sources" at "Download" and click "Setup" to download;
3. Install download the installation package named "Regex-2.7-setup", the default installation location is C:\Program Files (x86) \gnuwin32, after no brain installation, the final directory structure is as follows:;
4. Under the Bin folder in the installation location, such as C:\Program Files (x86) \gnuwin32\bin, copy the Regex2.dll to the root of the project that needs to use the regular expression, as shown in:;
5. Open the Codeblocks project and select "Build Options ..." in "Project";
6. Under the "Linker Settings" tab, click "Add" to add "Regex.lib" under the Lib file in the previously installed GnuWin32 to "Link libraries:";
7. Click "Add" under "Compiler" under "Search directiories" to add the Include folder in GnuWin32;
8. Under "Search directiories" tab, under "Linker" click "Add" to add the GnuWin32 Lib folder;
9. Click "OK" to complete the import.
Codeblocks import GNU Regex Library Regular expression under Windows environment