Hi,
In your string you are escaping a " with the escape character, \, however,
you told the compiler that the string is a literal by using the @ character,
so it won't process the \. It sees a string with three quotes so it's
complaining.
When using the @ character to make a string literal, you can escape a
quotation mark with another quotation mark:
@"('|"")"
--
Dave Sexton
http://davesexton.com/blog http://www.codeplex.com/DocProject (Sandcastle in VS IDE)
"intrader" <in******@aol.comwrote in message
news:45**********************@roadrunner.com...
>I can't figure out why VS2005 has a problem with the following definition
Regex rx = new Regex(@"('|\")"); //here put squiggle under ");
what I think I am writing is a regular expresion that will give me all the
matches for single or double quotes and remember the match so that I can
then say
Regex.Replace(somestring,rx,@"\\$1");
Help is greatly appreciated
Thanks