in reply to Can you do an OR with a REGEXP

To answer the specific question asked, there are two ways to use or concepts in Perl regular expressions. There is an alternation operator "|" or, as would be more applicable in your case, there is a one-or-none qualtifier "?". Both are discussed in Regular Expressions. You may also consider a read through of perlretut to familiarize yourself with details in regular expressions. Of course for common regular expressions like the one you are looking for, there's usually an implementation you case borrow from CPAN, such as zwon's suggestion above or Regexp::Common.