Use same regx to detect output paths