[issue26772] regex.ENHANCEMATCH crashes interpreter

2016-04-15 Thread Rex Dwyer
New submission from Rex Dwyer: regex.findall(r'((brown)|(lazy)){1<=e<=3} ((dog)|(fox)){1<=e<=3}', 'The quick borwn fax jumped over the lzy hog', regex.ENHANCEMATCH) crashes interpreter. regex.__version__ => 2.4.85 python version '3.4.2 (v3.4.2:ab2c0

[issue22817] re.split fails with lookahead/behind

2014-11-07 Thread Rex Dwyer
New submission from Rex Dwyer: I would like to split a DNA sequence with a restriction enzyme. A description enzyme can be describe as, e.g. r'(?CA)(?=GCTG)' I cannot get re.split to split on this pattern as perl 5 does. -- components: Regular Expressions messages: 230831 nosy

[issue22817] re.split fails with lookahead/behind

2014-11-07 Thread Rex Dwyer
Rex Dwyer added the comment: sorry if I wasn't clear. s = 'ACGTCAGCTGAAAAGCTGACGTACGT re.split(r'(?CA)(?=GCTG)',s) expected output is: acgtCA|GCTGaaacccCA|GCTGacgtacgt - ['ACGTCA', 'GCTGAAAA', 'GCTGACGTACGT'] I would also be able to split a text on word boundaries: re.split(r'\b