Skip to content

Instantly share code, notes, and snippets.

Created Apr 12, 2020
What would you like to do?
var path = @"日本語の姓.txt";
var names = File.ReadAllLines(path).Where(x => x.Trim() != "").ToList();
var filteredNames = names
.Select(x => Regex.Replace(x, @"\(.+\)", "").Replace(" ", ""))
.Where(x => x.All(y => charHashSet.Contains(y)))
Console.WriteLine(string.Join(",", filteredNames));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment