excluding search string in regular expressions
Diez B. Roggisch
deets.nospaaam at web.de
Thu Oct 21 09:32:37 EDT 2004
>
> A more common solution for detecting functions/Methods would be fine.
Maybe you should go for a real parser here - together with a
C-syntax-grammar. Trying to cram this stuff into regexps is bound for not
catching special cases. And its gereally difficult to have a regexp _not_
macht a certain word.
Another approach would be to look for closing comments and function
definitions in several rexes, and use python-logic:
if doxy_close_rex.match(line):
line = lines.next()
if fun_def_rex.match(line):
....
--
Regards,
Diez B. Roggisch
More information about the Python-list
mailing list