Splitting with Regular Expressions

Fredrik Lundh fredrik at pythonware.com
Fri Mar 18 21:07:02 CET 2005

"qwweeeit" <qwweeeit at yahoo.it> wrote:

> In fact I am implementing a cross-reference tool  and working on
> python sources, I don't need the '.' as separator in order to capture
> variables and commands.

if you're parsing Python source code, consider using the tokenize module:


if you don't have to support "broken" source code, the parse module may
be even more useful:


for simpler cases, the "class browser" parser may be an even better choice:



More information about the Python-list mailing list