using System;
using System.Text.RegularExpressions;
class Program
{
static void Main() {
string s = "c @php @csharp java @cpp python cobol @swift";
string pattern = @"\B@\w+";
MatchCollection mc = Regex.Matches(s, pattern);
foreach (Match match in mc) {
Console.WriteLine(match);
}
}
}
/*
run:
@php
@csharp
@cpp
@swift
*/