avoided lookbehind as not supported in JS; porting code added; yaml cleanup