regex test case

Benchmark created on


Setup

var globalGuidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/

Test runner

Ready to run.

Testing in
TestOps/sec
use from global
function testRegGlobal(val) {   
    return globalGuidRegex.test(val)
}

testRegGlobal("adfbcaa8-23be-47dc-b478-2a148339963d")
ready
declare in func
function testReg(val) {
	var guidRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/
    return guidRegex.test(val)
}

testReg("adfbcaa8-23be-47dc-b478-2a148339963d")
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.