Added code so regexp would ignore submatches