Regex exp again... need to match exactly two letters.

From: Merlin (_at_)
Date: 01/31/04

  • Next message: Jeff Thies: "Re: how to loop over instances of a class"
    Date: Sat, 31 Jan 2004 16:03:35 +1000
    
    

    ($row[0] =~ /^[A-Z]{2}$/)

    Shouldn't this match a line that has ONLY the country code on it, ie;

    AU
    US
    Fred's AUSTRALIA
    Bills US Postal Service. GA

    and I only want it to return line 1 and 2. That is
    AU
    and
    US

    So it has to match a line that has ONLY two capital letters in it.

    thanks
    Robert

    -- 
    ---
    The Mission of Our Lady of Fatima.
    http://www.the-mission-of-our-lady-of-fatima.org
    "I come from Heaven. I am the Lady of The Rosary"
    

  • Next message: Jeff Thies: "Re: how to loop over instances of a class"

    Relevant Pages