re.py
author Christian Urban <urbanc@in.tum.de>
Wed, 14 Nov 2012 08:46:00 +0000
changeset 63 dff4b062a8a9
parent 49 d2c6852ca8da
permissions -rwxr-xr-x
added

#!/usr/bin/env python
import re
import sys

cn = sys.argv[1]

r1 = '((a?){%s})' % cn
r2 = 'a{%s}' % cn

m = re.match(r1 + r2 , "a" * int(cn)) 

print m.group(0)