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 May 11, 2006 | 08:30 PM
  #1  
molko's Avatar
molko
Thread Starter
Scooby Regular
 
Joined: Jun 2004
Posts: 638
Likes: 0
From: UK
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
Reply
Old May 11, 2006 | 08:40 PM
  #2  
molko's Avatar
molko
Thread Starter
Scooby Regular
 
Joined: Jun 2004
Posts: 638
Likes: 0
From: UK
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
Reply
Old May 11, 2006 | 09:02 PM
  #3  
molko's Avatar
molko
Thread Starter
Scooby Regular
 
Joined: Jun 2004
Posts: 638
Likes: 0
From: UK
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
Reply
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
Wingnuttzz
Member's Gallery
30
Apr 26, 2022 11:15 PM
KAS35RSTI
Subaru
27
Nov 4, 2021 07:12 PM
Sambob
Engine Management and ECU Remapping
41
Nov 27, 2015 07:36 PM
powerwrx
Non Scooby Related
21
Oct 3, 2015 11:31 PM
JonMc
Lighting and Other Electrical
12
Sep 25, 2015 11:34 AM




All times are GMT +1. The time now is 02:02 PM.