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 leftmost-longest matches (platform = linux, compiler = GNU C++ version 5.1.0)

Table 15. Testing simple leftmost-longest matches (platform = linux, compiler = GNU C++ version 5.1.0)

Expression
Text

std::regex

boost 1.59

POSIX

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

1.00
(431ns)

1.25
(537ns)

3.45
(1486ns)

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

4.60
(2203ns)

1.00
(479ns)

12.80
(6133ns)

^([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.28
(869ns)

1.00
(681ns)

2.61
(1775ns)

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

1.11
(752ns)

1.00
(675ns)

2.44
(1644ns)

^([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.24
(1116ns)

1.00
(899ns)

2.61
(2342ns)

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

1.61
(339ns)

1.76
(370ns)

1.00
(210ns)

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

1.66
(342ns)

1.79
(368ns)

1.00
(206ns)

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

1.69
(248ns)

3.70
(544ns)

1.00
(147ns)

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

2.23
(256ns)

2.63
(303ns)

1.00
(115ns)

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

1.97
(213ns)

2.70
(292ns)

1.00
(108ns)

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

2.38
(255ns)

3.31
(354ns)

1.00
(107ns)

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

2.12
(216ns)

2.90
(296ns)

1.00
(102ns)

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

2.25
(234ns)

2.89
(301ns)

1.00
(104ns)

abc
abc

1.20
(113ns)

2.38
(224ns)

1.00
(94ns)



PrevUpHomeNext