Factorize ugly regexp list to ease future cleanup.