After a good rest, found it:
using System;
using System.Text.RegularExpressions;
public class Program
{
public static void Main()
{
string str = "hello 'a' 'b' cc '''''";
Match match = Regex.Match(str, @"(?<=')[^'\s]+(?=')|['](?=')|(?<=')[']");
while (match.Success)
{
Console.WriteLine(match.Value);
match = match.NextMatch();
}
}
}
it will return:
a
b
'
'
'
'
'