Regular Expression
#1
Scooby Regular
Thread Starter
Join Date: Jun 2004
Location: UK
Posts: 638
Likes: 0
Received 0 Likes
on
0 Posts
Regular Expression
anyone handy with Regular Expression, i could do with some help. I need a regular expression to extract method name from a decompiled java class.
I am using javap -public to get all the public methods from the class, this provides me with method declarations like this (plus loads of others)
public static boolean isValid(java.lang.String[]);
I am using javap -public to get all the public methods from the class, this provides me with method declarations like this (plus loads of others)
public static boolean isValid(java.lang.String[]);
I want to be able to extract just specfic methods, for example i may want to exclude all methods that have a $ in it (hasCustomer$Paid).
Any ideas ?
Ta
Any ideas ?
Ta
#2
Scooby Regular
Thread Starter
Join Date: Jun 2004
Location: UK
Posts: 638
Likes: 0
Received 0 Likes
on
0 Posts
this is what i have so far
"^(public)\\s*([a-zA-Z_0-9\\s[^boolean | $]]+)[(]"
it should find all public methods that dont return the boolean type and dont have $ anywhere in the signature - anyone like to confirm
"^(public)\\s*([a-zA-Z_0-9\\s[^boolean | $]]+)[(]"
it should find all public methods that dont return the boolean type and dont have $ anywhere in the signature - anyone like to confirm
#3
Scooby Regular
Thread Starter
Join Date: Jun 2004
Location: UK
Posts: 638
Likes: 0
Received 0 Likes
on
0 Posts
Originally Posted by molko
it should find all public methods that dont return the boolean type and dont have $ anywhere in the signature - anyone like to confirm
Thread
Thread Starter
Forum
Replies
Last Post
Wingnuttzz
Member's Gallery
30
26 April 2022 11:15 PM
Sambob
Engine Management and ECU Remapping
41
27 November 2015 07:36 PM