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: 
I think the regex feature you're after is negative lookbehind. Try splitting on this regex:

```
(?<!A),

```

Eg. 

```
new Regex(@"(?<!A),").Split("This text A,is separated,by a comma A,unpreceded by the uppercase A,letter A,ok?,");

```
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.