regtest

Benchmark created by vali on


Test runner

Ready to run.

Testing in
TestOps/sec
String
var regEx = /#region\s(.*?\w+)#/g;
var template = '<table>'
'<thead data-region="tHead">' +
  '#region tHead#' +
  'This is my content' +
  '#region tHead#' +
  '</thead>' +
  '<tbody data-region="tBody">' +
  '#region tBody#' +
  'This is my content' +
  '#region tBody#' +
  '</tbody>' +
  '</table>'
template.replace(regEx, function() {
  return 'boom';
})
ready
HTML
var regEx = /<([\w:]+)([^>]*)(data-region="(\w+)")(?:>((.|\n)*)<\/\1>|\s+\/>)/g
var template = '<table>' +
  '<thead data-region="tHead">' +
  'This is my content' +
  '</thead>' +
  '<tbody data-region="tBody">' +
  'This is my content' +
  '</tbody>' +
  '</div>';

template.replace(regEx, function() {
  return 'boom';
})
ready

Revisions

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