regex compile

Benchmark created on


Setup

let restr = '(\\w+:\\/\\/)([^.]+\\.)*(localhost|gg\\.com|asasasasa\\.com|asdsk\\.com|edf\\.com|klkjlkld\\.com|login\\.microsoftonline\\.com)(:[0-9]+)?$'
let rere = new RegExp(restr);

let good = "https://login.microsoftonline.com";
let bad = "https://fake.com";

Test runner

Ready to run.

Testing in
TestOps/sec
string
good.match(restr);
bad.match(restr);
ready
regexp
rere.test(good);
rere.test(bad);
ready

Revisions

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