[prev in list] [next in list] [prev in thread] [next in thread]
List: jakarta-regexp-user
Subject: Matching Java methods - a better way than mine?
From: mfarah () bci ! cl
Date: 2003-07-30 20:46:43
[Download RAW message or body]
I've been asked to extract certain information from all the methods within
the classes we use. For this, I made a rather crude program, and I identify
each method with the following regexp:
(public|private|protected)\s+[0-9A-Za-z_\.]+\s*(\[\s*\])?\s+\w+\s*\([^\)]*?
\)
This works for most of the methods in our source files, but fails to
capture the constructor methods and those who have a modifier (like
abstract or static). What is a better way to do this? Maybe this has even
been solved in the past and I'm just reinventing the wheel?
TIA.
--
Miguel Farah
mfarah@bci.cl
---------------------------------------------------------------------
To unsubscribe, e-mail: regexp-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: regexp-user-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic