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 = Windows x64, compiler = Microsoft Visual C++ version 14.0)

Table 14. Testing simple leftmost-longest matches (platform = Windows x64, compiler = Microsoft Visual C++ version 14.0)

Expression
Text

boost 1.60

std::regex

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

1.00
(490ns)

6.88
(3372ns)

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

1.00
(554ns)

-

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

-

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

-

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

-

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

1.00
(372ns)

9.77
(3635ns)

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

1.00
(367ns)

9.84
(3613ns)

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

1.00
(444ns)

8.45
(3754ns)

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

1.00
(325ns)

5.19
(1687ns)

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

1.00
(308ns)

5.39
(1660ns)

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

1.00
(356ns)

6.78
(2415ns)

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

1.00
(315ns)

6.14
(1935ns)

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

1.00
(346ns)

5.68
(1967ns)

abc
abc

1.00
(287ns)

2.32
(667ns)



PrevUpHomeNext