Remove all non-letter and non-digit characters from your header and then do a case-insensitive comparison. Something like
$header =~ s/[^a-zA-Z0-9]//g; if( $header =~ /header1|header2/i ) { ...
UPDATE: changed /I to /i
In reply to Re: Help with regex
by hdb
in thread Help with regex
by reaper9187
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |