in reply to A tidier regex ?
#!/usr/bin/perl use warnings; use strict; while(<>) { if(m/\bCDC_([A-Z])+_([A-Z0-9])+\b|\b(DDCSMR|DDCRMR)([A-Z0-9])+\b/) {pr +int "Found a match $_\n";} } [download]