Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I want to find any word contain in vb file, except comment code
Example:
VB
' GetType(System.String))
 MyGetType(System.String))
 MyGetType_String(System.String))
" 'GetType(System.Int))'"

* Result:
VB
MyGetType(System.String))
 MyGetType_String(System.String))
" 'GetType(System.Int))'"


What do you do pattern of Regex?
Posted
Updated 7-Aug-13 17:36pm
v2
Comments
Sergey Alexandrovich Kryukov 7-Aug-13 23:44pm    
May I ask why?
—SA
huyenchi119 7-Aug-13 23:53pm    
I want to find all line code VB.Net, which contain 'my custom string' and not comment line
Sergey Alexandrovich Kryukov 8-Aug-13 0:10am    
Okay, but how about answering my question?
—SA
huyenchi119 8-Aug-13 0:28am    
If use Regex Expression to find then how?
I don't know more Regex, Can You help me?
Or other way?
Sergey Alexandrovich Kryukov 8-Aug-13 0:57am    
If you are ignoring my question, why would I answer yours? Believe me, if I'm asking, it's related to trying to help you.
—SA

1 solution

Do you know the capabilities of Visual Studio, even available in the Express versions?
If your string is a variable name, click on it, and "Go to definition". Then you can "search for all references".
It's true that the "common" text search of VS will show you the text found in in comments also.
 
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