0

Code:

Regex rx = new Regex(@"A(\S");

foreach (Match match in rx.Matches(strinG))
{
  int ii = match.Index;
  Console.WriteLine(ii);
 }

gives error during run-time,

system argument exception - " A(\S" not enough )' ".

Can anybody help me, how to solve this ?

user1838343
  • 451
  • 2
  • 8
  • 16

1 Answers1

4

i assume you're searching for a parenthesis, then backslash it.

Regex rx = new Regex(@"A\(\S");
RazorEater
  • 265
  • 2
  • 14