changed input parent regex group number from 1 to 0, in case of no capturing goup