cLive ;-) has asked for the wisdom of the Perl Monks concerning the following question:

I need to match French VAT numbers. They are of the form:
FRxxdddddddd
where x is a digit, or an uppercase letter, except for I or O, and d is a digit. (I tr string to upper case b4 reg exp).

I matched it as:

/^FR[A-HJ-NP-Z0-9]{2}\d{8}$/
but I think this looks clumsy.

Does anyone have a more efficient way to match "all letters except I and O"???

Replies are listed 'Best First'.
Re: French VAT codes reg exp - more efficient way?
by I0 (Priest) on Mar 31, 2001 at 05:42 UTC
    [^\W_OIoi]