mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2026-04-06 06:43:47 +00:00
Initial commit
This commit is contained in:
parent
143e708681
commit
5d934d40d6
6 changed files with 52 additions and 6 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue