473,748 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to exclude Comment lines from Find results

Hi,

Does anyone know how to run a find that excludes source lines that are
totally comments?
(I have used regex with good results for some other purposes, but not this
one.)

Stephen B.
Dec 19 '05 #1
1 1345
Oh, I should have mentioned that I am using VS.NET 2003.
The issue is that when you do a search of hundreds of programs that have
many commented changes, you tend to get more comments in the results than
current logic, so it would be really nice to know how to filter out the
comments from the listing.
--
Stephen B.
Dec 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
9351
by: Han | last post by:
Yet another newbie regular expression question (I swear, I'm learning!) I have a simple pattern that captures an anchor tag: (<a.*?</a>) It works great. I would now like to modify this to EXCLUDE occasional opening and closing bold tags (<b></b>) around the text. For example:
12
2844
by: ketulp_baroda | last post by:
Hi Can I comment a group of statements together i.e If I a 4 statements say: i=1 i+=1 print i print i+1 Instead of commenting each satement iindividually by # is there something which allws me to comment these 4 statements in one go as in
16
2301
by: qwweeeit | last post by:
In analysing a very big application (pysol) made of almost 100 sources, I had the need to remove comments. Removing the comments which take all the line is straightforward... Instead for the embedded comments I used the tokenize module. To my surprise the analysed output is different from the input (the last tuple element should exactly replicate the input line) The error comes out in correspondance of a triple string.
1
4768
by: joe shaboo | last post by:
HI, I'm new to Perl. I'm trying to write a simple script which will comment out a domain in my named.conf file for Bind. What I would like to do, is write a script which will comment out a domain from my named.conf if I no longer want to host that domain. So, what I'd like to do is create a means to search for a domain (mydomain.com) and comment out that file and all lines associated with
26
11790
by: Shannon Jacobs | last post by:
Sorry to ask what is surely a trivial question. Also sorry that I don't have my current code version on hand, but... Anyway, must be some problem with trying to do the negative. It seems like I get into these ruts each time I try to deal with regular expressions. All I'm trying to do is delete the lines which don't contain a particular string. Actually a filter to edit a log file. I can find and replace a thing with null, but can't...
4
3609
by: shonend | last post by:
I am trying to extract the pattern like this : "SUB: some text LOT: one-word" Described, "SUB" and "LOT" are key words; I want those words, everything in between and one word following the "LOT:". Source text may contain multiple "SUB: ... LOT:" blocks. For example this is my source text:
16
1860
by: Christopher | last post by:
Hello all, I've got a question of comment logic. I'm trying to determine if a given line of C/C++/C#/Java is a comment or not. Can you please comment on my logic. I need to define some terms first: starts with = has only white space on the line untill it reaches ... first preceeding valid /* = looking back, the first /* from the current point in the file where the line does not have a // before the /*
2
1953
by: jonathan184 | last post by:
How to exclude lines from a txt file that start with a # Hi basically my script works fine. I wanted to add some comments in my config file but it is reading in the comment lines to. So basically i want to not read in the config lines in the script. This is the piece of the script that is reading in the lines in the array. Now it works fine without the if statement. So reason it is not working.
39
2875
by: polas | last post by:
Afternoon all. I was just wondering about this point - I have (generally) used // for commenting a single line in C, but from looking at code other people have written it seems many use /* */ (which I only use if my comment will be over multiple lines) - does one way have any advantages over the other, or is the style exactly that, a question of style? Cheers, Nick
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9562
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9386
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9333
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8255
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3319
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.