Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) Boost Boost.Regex

 

Boost.Regex is a Boost library for regular expressions.

 

 

 

 

 

Example programs and code snippets

 

 

 

 

 

 

Example boost::regexes

 

Regex

Purpose

.*\.(h|hpp|c|cpp)\z

Test filename for .c, .cpp, .h or .hpp extension

\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}

IP address

http://(www\.)?(\w*\.)+\w*

General internet domain

here

Internet domain that checks for valid extensions

(\(\d,\(\d,\d\)\))|(\(\(\d,\d\),\d\))

Simple Newick

 

 

 

 

 

Qt Creator Note for Qt Creator users

 

Add the following line to your project file (to prevent link errors):

 

LIBS += -lboost_regex

 

 

 

 

 

External links

 

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict