Message230834
| Author |
rexdwyer |
| Recipients |
ezio.melotti, mrabarnett, rexdwyer, serhiy.storchaka |
| Date |
2014年11月07日.22:08:06 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1415398087.21.0.102116868296.issue22817@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
sorry if I wasn't clear.
s = 'ACGTCAGCTGAAACCCCAGCTGACGTACGT
re.split(r'(?<CA)(?=GCTG)',s)
expected output is:
acgtCA|GCTGaaacccCA|GCTGacgtacgt
-> ['ACGTCA', 'GCTGAAACCCCA', 'GCTGACGTACGT']
I would also be able to split a text on word boundaries:
re.split(r'\b', "the quick, brown fox")
-> ['the', ' ', 'quick', ', ', 'brown', ' ', 'fox']
but that doesn't work either so maybe it's a problem with all zero-width matches. |
|