示例: 判断字符串是否由字母数字下划线组成: using System; using System.Diagnostics; using System.Text.RegularExpressions; namespace ConsoleApp6 { class Program { static Regex regex = new Regex(@"^[A-Za-z0-9]+$"); static void Main(string[] args) { string[] a = new st[....…

