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 a snapshot of the develop branch, built from commit a46288a84e.
PrevUpHomeNext

Testing simple leftmost-longest matches (platform = Windows x64, compiler = GNU C++ version 11.4.0)

Table 9. Testing simple leftmost-longest matches (platform = Windows x64, compiler = GNU C++ version 11.4.0)

Expression
Text

boost 1.85

std::regex

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

1.43
(534ns)

1.00
(373ns)

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

1.00
(412ns)

3.53
(1455ns)

^([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.03
(578ns)

1.00
(561ns)

^([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
(567ns)

1.34
(760ns)

^([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.05
(779ns)

1.00
(742ns)

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

1.00
(327ns)

1.10
(361ns)

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

1.08
(341ns)

1.00
(315ns)

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

1.85
(440ns)

1.00
(238ns)

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

1.14
(296ns)

1.00
(259ns)

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

1.08
(270ns)

1.00
(249ns)

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

1.31
(322ns)

1.00
(245ns)

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

1.15
(283ns)

1.00
(246ns)

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

1.22
(296ns)

1.00
(242ns)

abc
abc

1.37
(242ns)

1.00
(177ns)



PrevUpHomeNext