Initial commit

This commit is contained in:
Mark J Price 2022-09-18 20:50:52 +01:00
parent 143e708681
commit 5d934d40d6
6 changed files with 52 additions and 6 deletions

View file

@ -3,7 +3,7 @@
Write("Enter your age: ");
string input = ReadLine()!; // null-forgiving
Regex ageChecker = new(@"^\d+$");
Regex ageChecker = DigitsOnly();
if (ageChecker.IsMatch(input))
{
@ -32,8 +32,7 @@ foreach (string film in filmsDumb)
WriteLine(film);
}
Regex csv = new(
"(?:^|,)(?=[^\"]|(\")?)\"?((?(1)[^\"]*|[^,\"]*))\"?(?=,|$)");
Regex csv = CommaSeparator();
MatchCollection filmsSmart = csv.Matches(films);