"Guhanath" <Gu******@discussions.microsoft.comwrote in message
news:2F**********************************@microsof t.com...
>I have a string with some escape charaecters that need to be processed in
our
file
Say for example the string might have something like following
<escape V=".sp2" />
step 1:
This has to be replaced to "escape V=".sp2"
step 2:
Later it has to be reversed as original(<escape V=".sp2" />) after some
processing.
We need a soln with respect to regex in C#.
There may may be many instances od this string in the file.so we need to
replace all instances.Please provide a solution
If you just want to know how to set up a parser for regular expressions in
C# , use the following code segment as a guide:
Regex rex = new Regex(".*?;");
string answer;
byte[] out_string;
uint result;
for(Match m = rex.Match(CommBuffer); m.Success; m = m.NextMatch())
{
answer = parser.Get(m.Value);
out_string = AE.GetBytes(answer);
result = SIO.put(out_string, (uint) out_string.Length);
CommBuffer = CommBuffer.Replace(m.Value, "");
}
--
================================================== ====================
Joseph "Beemer Biker" Stateson
http://ResearchRiders.org Ask about my 99'R1100RT
================================================== ====================