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

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

Expression
Text

boost 1.65

std::regex

POSIX

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

1.11
(669ns)

1.00
(603ns)

3.70
(2234ns)

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

1.00
(781ns)

4.52
(3530ns)

12.72
(9933ns)

^([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.00
(937ns)

1.26
(1184ns)

3.06
(2864ns)

^([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.00
(892ns)

1.29
(1150ns)

2.95
(2628ns)

^([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.00
(1160ns)

1.31
(1517ns)

3.29
(3818ns)

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

1.58
(485ns)

1.48
(455ns)

1.00
(307ns)

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

1.50
(466ns)

1.50
(464ns)

1.00
(310ns)

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

3.10
(666ns)

1.57
(338ns)

1.00
(215ns)

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

2.18
(373ns)

2.10
(359ns)

1.00
(171ns)

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

2.27
(363ns)

1.93
(309ns)

1.00
(160ns)

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

2.90
(473ns)

2.19
(357ns)

1.00
(163ns)

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

2.56
(386ns)

1.83
(277ns)

1.00
(151ns)

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

2.46
(381ns)

2.14
(331ns)

1.00
(155ns)

abc
abc

2.35
(324ns)

1.11
(153ns)

1.00
(138ns)



PrevUpHomeNext