#!/usr/bin/env python
# Copyright 2014 Tomasz Wyderka <[email protected]>
##
import re

string  = "peach, gooseberry, aaaaaaaaaaaaaaaaaaaaaaaaaa"
pattern = r"\w+"
flags   = 0 # re.DOTALL | re.MULTILINE

m = re.search( pattern, string, flags )
print repr( m.group() ),
print "from %d to %d" % m.span(),
print "with groups: %s" % str( m.groups() )