hi, folks
I am doing a automate tool to remove a project reference from the
VS.NET solution file.
Suppose the sln file has this project definition
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project", "..\..
\..\Project.csproj", "{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}"
How exactly can I use regular expression to find this project
definition? and read the project GUID
"{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}"?
because this is just the first step, if you open any your own solution
file, you will see this GUID will specify the build configuration of
this project. so I have to grab this piece then later I can remove the
following:
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Debug|Any CPU.ActiveCfg =
Debug|Any CPU
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Debug|Any CPU.Build.0 = Debug|
Any CPU
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Debug|x86.ActiveCfg = Debug|
x86
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Debug|x86.Build.0 = Debug|x86
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Release|Any CPU.ActiveCfg =
Release|Any CPU
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Release|Any CPU.Build.0 =
Release|Any CPU
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Release|x86.ActiveCfg =
Release|x86
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Release|x86.Build.0 = Release|
x86
I am kind of losing track here. Can anyone give me a hint, Thanks a
lot! 4 1601
Sorry I can't help Sowen. I don't even know what "regular expression"
means. I was going to suggest some string substring search
algorithms, but I see this is a different problem it seems.
Good luck!
RL
sowen wrote:
hi, folks
I am doing a automate tool to remove a project reference from the
VS.NET solution file.
Suppose the sln file has this project definition
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project", "..\..
\..\Project.csproj", "{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}"
How exactly can I use regular expression to find this project
definition? and read the project GUID
"{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}"?
Hi,
Why you want to use regex?
You can use String.LastIndexOf.
"sowen" <so*********@gmail.comwrote in message
news:11*********************@50g2000hsm.googlegrou ps.com...
hi, folks
I am doing a automate tool to remove a project reference from the
VS.NET solution file.
Suppose the sln file has this project definition
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project", "..\..
\..\Project.csproj", "{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}"
How exactly can I use regular expression to find this project
definition? and read the project GUID
"{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}"?
because this is just the first step, if you open any your own solution
file, you will see this GUID will specify the build configuration of
this project. so I have to grab this piece then later I can remove the
following:
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Debug|Any CPU.ActiveCfg =
Debug|Any CPU
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Debug|Any CPU.Build.0 = Debug|
Any CPU
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Debug|x86.ActiveCfg = Debug|
x86
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Debug|x86.Build.0 = Debug|x86
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Release|Any CPU.ActiveCfg =
Release|Any CPU
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Release|Any CPU.Build.0 =
Release|Any CPU
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Release|x86.ActiveCfg =
Release|x86
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Release|x86.Build.0 = Release|
x86
I am kind of losing track here. Can anyone give me a hint, Thanks a
lot!
Hi,
"raylopez99" <ra********@yahoo.comwrote in message
news:11*********************@r29g2000hsg.googlegro ups.com...
Sorry I can't help Sowen. I don't even know what "regular expression"
means.
Regular expressions (or regex) are a powerful feature to find matching in a
string.
Take a look at: http://en.wikipedia.org/wiki/Regular_expression http://www.regular-expressions.info/
>I was going to suggest some string substring search
algorithms, but I see this is a different problem it seems.
As a matter of fact I suggested the same thing :)
On Sep 20, 10:14 am, sowen <sowenche...@gmail.comwrote:
hi, folks
I am doing a automate tool to remove a project reference from the
VS.NET solution file.
Suppose the sln file has this project definition
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Project", "..\..
\..\Project.csproj", "{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}"
How exactly can I use regular expression to find this project
definition? and read the project GUID
"{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}"?
because this is just the first step, if you open any your own solution
file, you will see this GUID will specify the build configuration of
this project. so I have to grab this piece then later I can remove the
following:
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Debug|Any CPU.ActiveCfg =
Debug|Any CPU
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Debug|Any CPU.Build.0 = Debug|
Any CPU
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Debug|x86.ActiveCfg = Debug|
x86
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Debug|x86.Build.0 = Debug|x86
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Release|Any CPU.ActiveCfg =
Release|Any CPU
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Release|Any CPU.Build.0 =
Release|Any CPU
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Release|x86.ActiveCfg =
Release|x86
{9D8A6B4A-8B37-4C2E-80B9-0DA4C5EF33B1}.Release|x86.Build.0 = Release|
x86
I am kind of losing track here. Can anyone give me a hint, Thanks a
lot!
Try
^Project\(\"({.*?})\".*\"({.*?})\"$
the first ID will be in match.Groups[1], the second ID will be in
match.Groups[2]. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Anand Pillai |
last post by:
To search a word in a group of words, say a paragraph or a web page,
would a string search or a regexp search be faster?
The string search would of course be,
if str.find(substr) != -1:...
|
by: tshad |
last post by:
Can you do a search for more that one string in another string?
Something like:
someString.IndexOf("something1","something2","something3",0)
or would you have to do something like:
if...
|
by: lucky |
last post by:
hi there!!
i'm looking for a code snipett wich help me to search some words into a
particular string and replace with a perticular word. i got a huge data
string in which searching traditional...
|
by: Dennis |
last post by:
I am trying to implement a "Find and Replace" dialog that allows using
wildcards in the find string, much like the Find and Replace Dialogs in Ms
Word, etc. Are there any references or examples on...
|
by: seannakasone |
last post by:
Is there a way to search a string for a whole word w/o using a regular
expression?
i.e.
mystring.IndexOf(mypattern, *WholeWord);
The reason i rather not use a regular expression is because...
|
by: ramarajs |
last post by:
Hi Team,
Can anyone give me the regular expression to search the following set of non printable characters ÑÑNL, " ˜ and many more non printable characters.
I have to search these characters...
|
by: Harry Haller |
last post by:
What is the fastest way to search a client-side database?
I have about 60-65 kb of data downloaded to the client which is
present in 3 dynamically created list boxes. The boxes are filled from
3...
|
by: Harry Haller |
last post by:
What is the fastest way to search a client-side database?
I have about 60-65 kb of data downloaded to the client which is
present in 3 dynamically created list boxes. The boxes are filled from
3...
|
by: Henning_Thornblad |
last post by:
What can be the cause of the large difference between re.search and
grep?
This script takes about 5 min to run on my computer:
#!/usr/bin/env python
import re
row=""
for a in range(156000):...
|
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...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
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...
|
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...
|
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...
|
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...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
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
| |