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
  • 431
  • 2
  • 8
  • 15

1 Answers1

4

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

Regex rx = new Regex(@"A\(\S");
RazorEater
  • 255
  • 1
  • 14