Created
April 12, 2020 15:11
-
-
Save jz5/3bcd5e1d1088b013834ed2a3779a272d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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))) | |
.ToList(); | |
Console.WriteLine($"{filteredNames.Count}件"); | |
Console.WriteLine(string.Join(",", filteredNames)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment