Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Regular Expression

Thread Tools
 
Search this Thread
 
Old 11 May 2006, 08:30 PM
  #1  
molko
Scooby Regular
Thread Starter
 
molko's Avatar
 
Join Date: Jun 2004
Location: UK
Posts: 638
Likes: 0
Received 0 Likes on 0 Posts
Default 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 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
Old 11 May 2006, 08:40 PM
  #2  
molko
Scooby Regular
Thread Starter
 
molko's Avatar
 
Join Date: Jun 2004
Location: UK
Posts: 638
Likes: 0
Received 0 Likes on 0 Posts
Default

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
Old 11 May 2006, 09:02 PM
  #3  
molko
Scooby Regular
Thread Starter
 
molko's Avatar
 
Join Date: Jun 2004
Location: UK
Posts: 638
Likes: 0
Received 0 Likes on 0 Posts
Default

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
it doesn't work
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Wingnuttzz
Member's Gallery
30
26 April 2022 11:15 PM
KAS35RSTI
Subaru
27
04 November 2021 07:12 PM
Sambob
Engine Management and ECU Remapping
41
27 November 2015 07:36 PM
powerwrx
Non Scooby Related
21
03 October 2015 11:31 PM
JonMc
Lighting and Other Electrical
12
25 September 2015 11:34 AM



Quick Reply: Regular Expression



All times are GMT +1. The time now is 11:26 AM.