import rep = re.compile("[AG].{2}(?:ATG|ATA|AAG).G")regex_result = p.search('ZZZAXXATGXGZZZ')print regex_result.group()# => AXXATGXG
Standard input is empty
AXXATGXG
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!