Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Testing simple leftmost-longest matches (platform = Windows x64, compiler = Microsoft Visual C++ version 14.1)

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

Expression
Text

boost 1.65

std::regex

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

1.00
(554ns)

11.06
(6127ns)

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

1.00
(679ns)

-

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

-

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

-

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

-

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

1.00
(466ns)

11.18
(5208ns)

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

1.00
(519ns)

9.79
(5083ns)

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

1.00
(619ns)

7.64
(4730ns)

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

1.00
(449ns)

5.23
(2347ns)

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

1.00
(362ns)

6.48
(2344ns)

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

2.48
(2699ns)

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

6.57
(2288ns)

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

6.41
(2296ns)

abc
abc

1.00
(375ns)

2.30
(864ns)



PrevUpHomeNext