'use strict';

var input, regex, extra;
var parth = require('./.')();

// #set
input = [
  '/',
  '/page',
  '/page/:number(\\d+)',
  'get /',
  'get /page',
  'get /:page',
  'get /page/:number(\\d+)',
  'get /:page(\\w+)/number',
  'get /:page(\\w+)/:number(\\d+)',
  '(get|post) /page/number',
  '(get|post) /:page(\\w+)/number',
  '(get|post) /:page(\\w+)/:Number(\\d+)',
  'get /page/number',
  '(get|post) /:page(\\w+)/:view([^.\\/]+)',
  '1', '2', '1 2',
  'obj.path',
  'obj.:path(\\S+).:number(\\d+)',
  'obj.path.:here',
  'obj.(prop|path).:here',
  ':obj.(method|prop).:here'

];

console.log('\n -- parth.set -- ');
input.forEach(function(stem, index){
  extra = { }; regex = parth.set(stem, extra);
  console.log(' input =', stem);
  console.log('return =', regex);
  console.log((input[index+1] ? ' -- ' : ''));
});

// #get
input = [
  '1',
  '2',
  '1 2',
  'obj.path.10',
  'obj.10.prop',
  'obj.10.10',
  'array.method.prop',
  'get /weekend/baby?query=string#hash user.10.beers now',
  'get /user/view/#hash',
  'post /user/page/photo?query=name&path=tree#hash'
];

console.log(' -- parth.get -- ');
input.forEach(function(stem, index){
  extra = { }; regex = parth.get(stem, extra);
  console.log(' input =', stem);
  console.log('return =', regex);
  console.log(' extra =', extra);
  console.log((input[index+1] ? ' -- ' : '' ));
});

if(process.argv.indexOf('-l') < 0){ return ; }
Object.keys(parth).forEach(function(prop){
  console.log(parth[prop]);
  console.log(' --\n');
});

parth.regex.forEach(function(re){
  console.log(re.path);
});

@@ -25,18 +25,12 @@
 , re
-gex, extra
+sult
 ;%0Ava
@@ -583,44 +583,8 @@
 %5D;%0A%0A
-console.log('%5Cn -- parth.set -- ');%0A
 inpu
@@ -622,164 +622,22 @@
 %7B%0A  
-extra = %7B %7D; regex = parth.set(stem, extra);%0A  console.log(' input =', stem);%0A  console.log('return =', regex);%0A  console.log((input%5Bindex+1%5D ? ' -- ' : '')
+parth.set(stem
 );%0A%7D
@@ -971,26 +971,14 @@
 %7B%0A  
-extra = %7B %7D; regex
+result
  = p
@@ -990,23 +990,16 @@
 get(stem
-, extra
 );%0A  con
@@ -1047,56 +1047,23 @@
 ('re
-turn
+sult
  =', re
-gex);%0A  console.log(' extra =', extra
+sult
 );%0A 
@@ -1087,17 +1087,19 @@
 ut%5Bindex
-+
+ + 
 1%5D ? ' -
@@ -1158,17 +1158,16 @@
 %7B return
- 
 ; %7D%0AObje

update the examples