Question: For the given text:

> 
> This text A,is separated,by a comma A,unpreceded by the uppercase A,letter A,ok?,
> 
> 
> 

Expected matches:

> 
> This text A,is separated,
> 
> 
> 

and

> 
> by a comma A,unpreceded by the uppercase A,letter A,ok?,
> 
> 
> 

Please write a regex that would work like described. Preferably one that will work with .NET

Answer: 
The regular expression you want is:

```
MatchCollection matches = Regex.Matches(myInput, @"([^,]+)(?<!A),");

```

(Edited to favor ([^,]+) over (.\*?), which should improve speed)

Take a look at [this cheat sheet](http://www.mikesdotnetting.com/Article/46/CSharp-Regular-Expressions-Cheat-Sheet) for more information.
```
static void Main(string[] args)
{
    string s = "ThisA,textA,isA,separated,byA,theA,absenceA,ofA,theA,letterA,\"a\",";
    string pattern = "[^A],";
    int startIndex = 0;
    foreach (Match line in Regex.Matches(s, pattern))
    {
        string chunk = s.Substring(startIndex, (line.Index + 1)-startIndex);
        Console.WriteLine(chunk);
        startIndex = line.Index + 2;
    }
    Console.Read();
}

```