Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
re lookaround
(version: 1)
Comparing performance of:
lookbehind vs normal vs lookforward
Created:
4 years ago
by:
Registered User
Jump to the latest result
Script Preparation code:
var re1 = /^(\d{0,9}(,?(?<=,)\d{0,2})?)(-?(?<=-)(\d{0,9}(,?(?<=,)\d{0,2})?))?$/; var re2 = /^(\d{0,9}(,\d{0,2})?)(-(\d{0,9}(,\d{0,2})?))?$/; var re3 = /^((?=(\d{0,9}))\2(,\d{0,2})?)(-((?=(\d{0,9}))\6(,\d{0,2})?))?$/;
Tests:
lookbehind
re1.test('25500,33-33090,770');
normal
re2.test('25500,33-33090,770');
lookforward
re1.test('25500,33-33090,770');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
lookbehind
normal
lookforward
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
nums unshorter
Performance formatted phone number. Regex replace vs slice. Ver. 2
split1 vs regex
Regex tests Dani
Comments
Confirm delete:
Do you really want to delete benchmark?