Click here to Skip to main content
16,021,765 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

Does anyone know of a method or software to search through source code (simmilar to agent ransack) but return the sub that the searched value is found in?

An example of what i am looking for would be searching for dbvalu='1' which returns

-----

filename

private sub test()

rownum# sql = "select * from db where dbvalu='1'"

-----

Thanks
Rex
Posted

1 solution

I take it you mean search the text files containing the source code?

If so, you could write your own using vb.net express 2008, and use regex to pull out the subs and functions and then use another regex to look in each of these subs/functions for the value you want.

That would be one approach.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900