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 5.1.0)

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

Expression
Text

std::regex

boost 1.59

boost::xpressive::cregex

PCRE-10.10

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

2.72
(384ns)

2.85
(402ns)

1.00
(141ns)

1.33
(187ns)

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

19.85
(2124ns)

2.68
(287ns)

1.00
(107ns)

2.94
(315ns)

^([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

-

2.16
(542ns)

1.00
(251ns)

1.25
(315ns)

^([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.22
(554ns)

1.00
(250ns)

1.28
(319ns)

^([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

-

2.10
(657ns)

1.00
(313ns)

1.16
(364ns)

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

4.08
(339ns)

2.51
(208ns)

1.00
(83ns)

1.42
(118ns)

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

4.14
(335ns)

2.49
(202ns)

1.00
(81ns)

1.46
(118ns)

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

3.17
(254ns)

2.25
(180ns)

1.00
(80ns)

1.32
(106ns)

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

3.02
(248ns)

2.52
(207ns)

1.00
(82ns)

1.18
(97ns)

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

2.70
(216ns)

2.25
(180ns)

1.00
(80ns)

1.18
(94ns)

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

2.54
(229ns)

2.39
(215ns)

1.00
(90ns)

1.16
(104ns)

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

2.46
(219ns)

2.39
(213ns)

1.00
(89ns)

1.18
(105ns)

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

2.51
(228ns)

2.31
(210ns)

1.00
(91ns)

1.12
(102ns)

abc
abc

1.92
(113ns)

2.12
(125ns)

1.07
(63ns)

1.00
(59ns)



PrevUpHomeNext