473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Visual Studio Find & Replace Question??


VS2005

In the find/replace dialog if I make a regex like this I can find all
of the "New" statements that instantiate a class with "System" in the
name:

<New>.*<System>

But how - in the VS find/replace dialog - can I negate the "System"
portion of the search? How do I say: find all lines with "New" that
do NOT have the word "System" after "New"??

Any help would be appreciated...
Jun 27 '08 #1
3 1704


"Crash" <so*********@san.rr.comwrote in message
news:5f**********************************@d77g2000 hsb.googlegroups.com...
>
VS2005

In the find/replace dialog if I make a regex like this I can find all
of the "New" statements that instantiate a class with "System" in the
name:

<New>.*<System>

But how - in the VS find/replace dialog - can I negate the "System"
portion of the search? How do I say: find all lines with "New" that
do NOT have the word "System" after "New"??

Any help would be appreciated...
Try the following:

<New>:b+<~(System).*>

I replaced your .* between Newand <System so it only matches whitespace
(tabs and/or spaces) in between.....change it back if that's not what you
want :)

HTH,
Mythran
Jun 27 '08 #2

"Crash" <so*********@san.rr.comwrote in message
news:5f**********************************@d77g2000 hsb.googlegroups.com...
>
VS2005

In the find/replace dialog if I make a regex like this I can find all
of the "New" statements that instantiate a class with "System" in the
name:

<New>.*<System>

But how - in the VS find/replace dialog - can I negate the "System"
portion of the search? How do I say: find all lines with "New" that
do NOT have the word "System" after "New"??

Any help would be appreciated...
You can write a solution that does this as an add in to the VS IDE. When you
publish it, let me know.

It had better work. <smile>

Jun 27 '08 #3


"Mythran" <My*****@community.nospamwrote in message
news:16**********************************@microsof t.com...
>

"Crash" <so*********@san.rr.comwrote in message
news:5f**********************************@d77g2000 hsb.googlegroups.com...
>>
VS2005

In the find/replace dialog if I make a regex like this I can find all
of the "New" statements that instantiate a class with "System" in the
name:

<New>.*<System>

But how - in the VS find/replace dialog - can I negate the "System"
portion of the search? How do I say: find all lines with "New" that
do NOT have the word "System" after "New"??

Any help would be appreciated...

Try the following:

<New>:b+<~(System).*>

I replaced your .* between Newand <System so it only matches whitespace
(tabs and/or spaces) in between.....change it back if that's not what you
want :)

HTH,
Mythran

You can also replace the (System).* with (System).@ to get only the word
portion and not the entire string (IE:

Dim I As New IO.Stream

The first post I made would capture "New IO.Stream" while the new way I
posted would capture "New IO"

HTH,
Mythran
Jun 27 '08 #4

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

Similar topics

1
by: Craig Skrabacz | last post by:
I originally had VB.Net standard installed on my computer. I have subsequently installed Visual Studio .Net 2002 on my computer. I have not uninstalled VB.Net. When I look in my Add/Remove...
8
by: Glenn Lerner | last post by:
When I used Visual Studio 6 I was able to cascade source code windows. This allowed me to view 2 separate source code files side by side and copy and paste between windows. How do I do this in...
4
by: JackRazz | last post by:
I'm trying to use Visual Studio's Find/Replace to match VB declarations. This RegEx works fine in Regulator: ...
4
by: Steve | last post by:
1) How can I perform backward search in editor of Visual Studio .NET? In VC++ 6.0 it was enough just to hold Shift button. This combination doesn't work anymore in Visual Studio .NET? 2) Each...
4
by: JackRazz | last post by:
Could someone give me a very simple regular expression for Visual Studio's search/replace using backreferences saving portions of the match as \1 or $1 or whatever. I want to use something I can...
3
by: michael.lang | last post by:
I am using PostBuild events in a C# project to run some tasks, but only when in release configuration mode. The build events run perfectly as expected when run. The problem comes when I save the...
4
by: Ben Kim | last post by:
Hello all, I have VS 2005 and SQL 2005 installed on my machine. However the "Getting Started" area of the Start Page shows SQL information instead of Visual Studio information when I start up...
6
by: JimmyKoolPantz | last post by:
I have been given the task of converting a program from VFP (visual foxpro) to Visual Basic.net. My question is "Is it possible to generate a DBF file Dynamically(at runtime) using Visual...
0
jwwicks
by: jwwicks | last post by:
Introduction This tutorial describes how to use Visual Studio to create a new C++ program, compile/run a program, resume work on an existing program and debug a program. It is aimed at the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.