RegExp Test 2

Benchmark created by miller on


Preparation HTML

<script>
  var text_succ = '.a select,.b input,.b input',
      text_fail = '.a select,.b input,.b input[',
      unoptimize = /^((^|,)\s*[.\w-][.\w\s\->+~]*)+$/g,
      optimize = /^\s*[.\w-][.\w\s\->+~]*(,\s*[.\w-][.\w\s\->+~]*)*$/g;
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
unoptimized
unoptimize.test(text_succ);
ready
optimized
optimize.test(text_succ);
ready

Revisions

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

  • Revision 1: published by miller on