How to NOT find in comments? [modified]
-
In Visual Studio, any version, any programming language, with any available add-in - Is it possible to omit the comments for searching. Yes, you probably got it right. For example:
int main()
{
// this is main function which calls printf three times
printf("three");
printf("three");
printf("three");
}And if I search 'three', 'printf' or other term that is ALSO in comment - VS will goto commented part as well which I dont want. Likewise, I may want to search only in comments. Or only/not-in strings.
modified on Thursday, January 20, 2011 11:09 AM
-
In Visual Studio, any version, any programming language, with any available add-in - Is it possible to omit the comments for searching. Yes, you probably got it right. For example:
int main()
{
// this is main function which calls printf three times
printf("three");
printf("three");
printf("three");
}And if I search 'three', 'printf' or other term that is ALSO in comment - VS will goto commented part as well which I dont want. Likewise, I may want to search only in comments. Or only/not-in strings.
modified on Thursday, January 20, 2011 11:09 AM
Not really. You can either use a regular expression if the comment is // or use "Find All References" for searching only in that class. In Word, you can do a search for text color. I don't think Visual Studio has formatting search.
-
In Visual Studio, any version, any programming language, with any available add-in - Is it possible to omit the comments for searching. Yes, you probably got it right. For example:
int main()
{
// this is main function which calls printf three times
printf("three");
printf("three");
printf("three");
}And if I search 'three', 'printf' or other term that is ALSO in comment - VS will goto commented part as well which I dont want. Likewise, I may want to search only in comments. Or only/not-in strings.
modified on Thursday, January 20, 2011 11:09 AM
Ajay Vijayvargiya wrote:
int main() { // this is main function which calls printf three times printf("three"); }
If you omit comment, how do you find out that your comment is wrong? printf("three"); is not the same as calling printf three times. :)
-
Not really. You can either use a regular expression if the comment is // or use "Find All References" for searching only in that class. In Word, you can do a search for text color. I don't think Visual Studio has formatting search.
VS doesn't have formatting search! Finding references doesn't solve the purpose. I may need to find symbols having specific words, and I want to avoid all comments. Or take it other way: I want to find some text embedded in string.
-
Ajay Vijayvargiya wrote:
int main() { // this is main function which calls printf three times printf("three"); }
If you omit comment, how do you find out that your comment is wrong? printf("three"); is not the same as calling printf three times. :)
Yeah.. ! ;P
-
In Visual Studio, any version, any programming language, with any available add-in - Is it possible to omit the comments for searching. Yes, you probably got it right. For example:
int main()
{
// this is main function which calls printf three times
printf("three");
printf("three");
printf("three");
}And if I search 'three', 'printf' or other term that is ALSO in comment - VS will goto commented part as well which I dont want. Likewise, I may want to search only in comments. Or only/not-in strings.
modified on Thursday, January 20, 2011 11:09 AM
Ajay Vijayvargiya wrote:
// this is main function which calls printf three times printf("three");
Is this the new feature of .NET?
printf("three")
callsprintf
three times? :rolleyes:Yusuf May I help you?
-
Ajay Vijayvargiya wrote:
// this is main function which calls printf three times printf("three");
Is this the new feature of .NET?
printf("three")
callsprintf
three times? :rolleyes:Yusuf May I help you?
With number-text parsing and recursion, yes! ;P
-
VS doesn't have formatting search! Finding references doesn't solve the purpose. I may need to find symbols having specific words, and I want to avoid all comments. Or take it other way: I want to find some text embedded in string.
Like I said, no, not really.