True, although the original regex had a @ in the quotes so (if this was
intentional) this should be:
Regex(@"@\(");
Obviously the first @ is to tell C# to use a literal string and not to treat
the \ as a C# string escape code.
Steve
"Niki Estner" <ni*********@cube.net> wrote in message
news:OI**************@TK2MSFTNGP11.phx.gbl...
Bad idea. Character sets are usually slower (more complex) than plain
characters.
Simply use escapes: Regex(@"\(");
That's it.
BTW: That works for all the special charaters like *+.\ and so on.
Niki
"Steve Willcock" <st***@N-O-S-P-A-Mwillcockconsulting.com> wrote in
news:cf*******************@news.demon.co.uk... Mark, try putting the ( in square brackets - e.g.
Regex r = new Regex("@[(]");
--
Steve Willcock, MCSD
http://www.willcockconsulting.com/
"Mark Johnson" <mj*****@mj10777.de> wrote in message
news:41***********************@newsread4.arcor-online.net... Regex("@("); brings an error (missing ")").
How do you serarch for a ( with Regex ?
Mark Johnson, Berlin Germany
mj*****@mj10777.de