Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Testing simple Perl matches (platform = linux, compiler = GNU C++ version 6.3.0)

Table 12. Testing simple Perl matches (platform = linux, compiler = GNU C++ version 6.3.0)

Expression
Text

boost 1.65

std::regex

boost::xpressive::cregex

PCRE-10.21

([[:digit:]]{4}[- ]){3}[[:digit:]]{3,4}
1234-5678-1234-456

2.65
(506ns)

2.86
(546ns)

1.00
(191ns)

1.37
(262ns)

^([0-9]+)(\-| |$)(.*)$
100- this is a line of ftp response which contains a message string

2.52
(353ns)

20.99
(2939ns)

1.00
(140ns)

3.50
(490ns)

^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\ ...
bob.smith@foo.tv

1.98
(681ns)

-

1.00
(344ns)

1.32
(454ns)

^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\ ...
foo12@foo.edu

2.06
(695ns)

-

1.00
(337ns)

1.34
(451ns)

^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\ ...
john@johnmaddock.co.uk

1.93
(821ns)

-

1.00
(425ns)

1.24
(526ns)

^[-+]?[[:digit:]]*\.?[[:digit:]]*$
+3.14159

2.34
(243ns)

4.45
(463ns)

1.00
(104ns)

1.62
(168ns)

^[-+]?[[:digit:]]*\.?[[:digit:]]*$
-3.14159

2.33
(245ns)

4.39
(461ns)

1.00
(105ns)

1.60
(168ns)

^[-+]?[[:digit:]]*\.?[[:digit:]]*$
123

2.08
(208ns)

3.31
(331ns)

1.00
(100ns)

1.52
(152ns)

^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$
12/12/2001

2.28
(237ns)

3.39
(353ns)

1.00
(104ns)

1.18
(123ns)

^[[:digit:]]{1,2}/[[:digit:]]{1,2}/[[:digit:]]{4}$
4/1/2001

2.12
(216ns)

3.02
(308ns)

1.00
(102ns)

1.19
(121ns)

^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$
EH10 2QQ

2.12
(257ns)

2.66
(322ns)

1.00
(121ns)

1.17
(142ns)

^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$
G1 1AA

2.00
(230ns)

2.65
(305ns)

1.00
(115ns)

1.22
(140ns)

^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$
SW1 1ZZ

2.05
(244ns)

2.81
(334ns)

1.00
(119ns)

1.22
(145ns)

abc
abc

1.65
(135ns)

1.83
(150ns)

1.00
(82ns)

1.02
(84ns)



PrevUpHomeNext