[Tutor] Help with re in Python 3

Prasad, Ramit ramit.prasad at jpmorgan.com
Fri Nov 4 22:06:57 CET 2011

>    m = re.search("[A-Z]{3}[a-z][A-Z]{3}", line)

That is the expression I would suggest, except it is still more efficient to use a compiled regular expression like the original version.


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  

More information about the Tutor mailing list