2 Regex Questions
AlphaBravo
ariel.bys at gmail.com
Tue Aug 17 05:35:24 EDT 2010
On Aug 17, 10:23 am, Peter Otten <__pete... at web.de> wrote:
> AlphaBravo wrote:
> > 2) How can I split a string into sections that MATCH a regex (rather
> > then splitting by seperator). Tokenizer-style but ignoring every place
> > from where I can't start a match?
> >>> import re
> >>> re.compile("[abc]+").findall("abcxaaa! abba")
>
> ['abc', 'aaa', 'abba']
Thanks for 2
More information about the Python-list
mailing list