Find All Capital Letter in a String - Regular Expression C#

If you insist on regular expressions:

 string source = @"Electronics and Communication Engineering";

 string result = string.Concat(Regex
   .Matches(source, "[A-Z]")
   .OfType<Match>()
   .Select(match => match.Value));

Linq is a (shorter) alternative:

 string result = string.Concat(source.Where(c => c >= 'A' && c <= 'Z'));

Edit: If "capital letters" include all Unicode capital letters, not only English, but, say, Russian ones, regular expression will use a different pattern

 string result = string.Concat(Regex
   .Matches(source, @"\p{Lu}")
   .OfType<Match>()
   .Select(match => match.Value));

and Linq solution will use a different condition:

 string result = string.Concat(source.Where(c => char.IsUpper(c)));

Linq Solution Example is here:

The extension method Where will helps you to get the capital letters from the given string. You can use either String.Join or String.Concat(nicer as suggested by DmitryBychenko) for getting the final output as a string. Go through the following snippet

string inputStr = "Electronics and Communication Engineering";
string outputStr=String.Concat(inputStr.Where(x=>Char.IsUpper(x)));
Console.WriteLine(outputStr);

Using LINQ:

string text = "Electronics and Communication Engineering";
var capitalLetters = text.Where(c => char.IsUpper(c)).ToArray();