v2
2/1/2022 by jamesfo -00
Setup HTML - click to add setup HTML
disable setup JavaScript
Setup JavaScript
RegExp.prototype.append = function(re) {
  return new RegExp(this.source + re.source, this.flags);
};

delete caserun single casemove downdrag and drop case


ready



var test1 = new RegExp ([
   '(?:(?:(https?|ftp):)?\\/\\/)'       // protocol
  ,'(?:([^:\\n\\r]+):([^@\\n\\r]+)@)?'  // user:pass
  ,'(?:(?:www\.)?([^\\/\\n\\r]+))'      // domain
  ,'(\\/[^?\\n\\r]+)?'                  // request
  ,'(\\?[^#\\n\\r]*)?'                  // query
  ,'(#?[^\\n\\r]*)?'                    // anchor
].join(''));
delete caserun single casemove upmove downdrag and drop case


ready



var test2 = new RegExp(''
  + /(?:(?:(https?|ftp):)?\/\/)/.source     // protocol
  + /(?:([^:\n\r]+):([^@\n\r]+)@)?/.source  // user:pass
  + /(?:(?:www\.)?([^\/\n\r]+))/.source     // domain
  + /(\/[^?\n\r]+)?/.source                 // request
  + /(\?[^#\n\r]*)?/.source                 // query
  + /(#?[^\n\r]*)?/.source                  // anchor
);
delete caserun single casemove upmove downdrag and drop case


ready



var test3 = new RegExp([
   /(?:(?:(https?|ftp):)?\/\/)/     // protocol
  ,/(?:([^:\n\r]+):([^@\n\r]+)@)?/  // user:pass
  ,/(?:(?:www\.)?([^\/\n\r]+))/     // domain
  ,/(\/[^?\n\r]+)?/                 // request
  ,/(\?[^#\n\r]*)?/                 // query
  ,/(#?[^\n\r]*)?/                  // anchor
].map(re=>re.source).join(''));
delete caserun single casemove updrag and drop case


ready



var test4 = /(?:(?:(https?|ftp):)?\/\/)/     // protocol
  .append(/(?:([^:\n\r]+):([^@\n\r]+)@)?/)   // user:pass
  .append(/(?:(?:www\.)?([^\/\n\r]+))/)      // domain
  .append(/(\/[^?\n\r]+)?/)                  // request
  .append(/(\?[^#\n\r]*)?/)                  // query
  .append(/(#?[^\n\r]*)?/);                  // anchor
Test Case - click to add another test case
Teardown JS - click to add teardown JavaScript
Output (DOM) - click to monitor output (DOM) while test is running
RUN