Skip to content

Commit

Permalink
Merge pull request #69 from codecrafters-io/change-slug-to-legacy-slug
Browse files Browse the repository at this point in the history
CC-1227 Change slug to legacy slug
  • Loading branch information
libmartinito authored May 16, 2024
2 parents 697ed83 + 2a27caa commit 436ac78
Showing 1 changed file with 30 additions and 15 deletions.
45 changes: 30 additions & 15 deletions course-definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ extensions:
[1]: https://learn.microsoft.com/en-us/dotnet/standard/base-types/backreference-constructs-in-regular-expressions#numbered-backreferences
stages:
- slug: "init"
- legacy_slug: "init"
slug: "init"
name: "Match a literal character"
difficulty: very_easy
description_md: |-
Expand Down Expand Up @@ -89,7 +90,8 @@ stages:
`a` should match "apple", but not "dog".
- slug: "match_digit"
- legacy_slug: "match_digit"
slug: "match_digit"
name: "Match digits"
difficulty: very_easy
description_md: |-
Expand Down Expand Up @@ -121,7 +123,8 @@ stages:
`\d` should match "1", but not "a".
- slug: "match_alphanumeric"
- legacy_slug: "match_alphanumeric"
slug: "match_alphanumeric"
name: "Match alphanumeric characters"
difficulty: very_easy
description_md: |-
Expand Down Expand Up @@ -153,7 +156,8 @@ stages:
`\w` should match "foo101", but not "$!?".
- slug: "positive_character_groups"
- legacy_slug: "positive_character_groups"
slug: "positive_character_groups"
name: "Positive Character Groups"
difficulty: medium
description_md: |-
Expand Down Expand Up @@ -183,7 +187,8 @@ stages:
`[abc]` should match "apple", but not "dog".
- slug: "negative_character_groups"
- legacy_slug: "negative_character_groups"
slug: "negative_character_groups"
name: "Negative Character Groups"
difficulty: medium
description_md: |-
Expand Down Expand Up @@ -213,7 +218,8 @@ stages:
`[^abc]` should match "dog", but not "cab" (since all characters are either "a", "b" or "c").
- slug: "combining_character_classes"
- legacy_slug: "combining_character_classes"
slug: "combining_character_classes"
name: "Combining Character Classes"
difficulty: medium
description_md: |-
Expand Down Expand Up @@ -256,7 +262,8 @@ stages:
This stage is significantly harder than the previous ones. You'll likely need to rework your
implementation to process user input character-by-character instead of the whole line at once.
- slug: "start_of_string_anchor"
- legacy_slug: "start_of_string_anchor"
slug: "start_of_string_anchor"
name: "Start of string anchor"
difficulty: medium
description_md: |-
Expand Down Expand Up @@ -286,7 +293,8 @@ stages:
`^log` should match "log", but not "slog".
- slug: "end_of_string_anchor"
- legacy_slug: "end_of_string_anchor"
slug: "end_of_string_anchor"
name: "End of string anchor"
difficulty: medium
description_md: |-
Expand Down Expand Up @@ -316,7 +324,8 @@ stages:
`dog$` should match "dog", but not "dogs".
- slug: "one_or_more_quantifier"
- legacy_slug: "one_or_more_quantifier"
slug: "one_or_more_quantifier"
name: "Match one or more times"
difficulty: hard
description_md: |-
Expand All @@ -342,7 +351,8 @@ stages:
- `a+` should match "apple" and "SaaS", but not "dog".
- slug: "zero_or_one_quantifier"
- legacy_slug: "zero_or_one_quantifier"
slug: "zero_or_one_quantifier"
name: "Match zero or one times"
difficulty: hard
description_md: |-
Expand All @@ -368,7 +378,8 @@ stages:
- `dogs?` should match "dogs" and "dog", but not "cat".
- slug: "wildcard"
- legacy_slug: "wildcard"
slug: "wildcard"
name: "Wildcard"
difficulty: medium
description_md: |-
Expand All @@ -394,7 +405,8 @@ stages:
- `d.g` should match "dog", but not "cog".
- slug: "alternation"
- legacy_slug: "alternation"
slug: "alternation"
name: "Alternation"
difficulty: hard
description_md: |-
Expand Down Expand Up @@ -422,7 +434,8 @@ stages:
# Backreferences

- slug: "backreferences-single"
- legacy_slug: "backreferences-single"
slug: "backreferences-single"
primary_extension_slug: "backreferences"
name: "Single Backreference"
difficulty: hard
Expand Down Expand Up @@ -451,7 +464,8 @@ stages:
**Example:**
- `(cat) and \1` should match "cat and cat", but not "cat and dog".
- slug: "backreferences-multiple"
- legacy_slug: "backreferences-multiple"
slug: "backreferences-multiple"
primary_extension_slug: "backreferences"
name: "Multiple Backreferences"
difficulty: medium
Expand All @@ -474,7 +488,8 @@ stages:
**Example:**
- `(\d+) (\w+) squares and \1 \2 circles` should match "3 red squares and 3 red circles" but should not match "3 red squares and 4 red circles".
- slug: "backreferences-nested"
- legacy_slug: "backreferences-nested"
slug: "backreferences-nested"
primary_extension_slug: "backreferences"
name: "Nested Backreferences"
difficulty: hard
Expand Down

0 comments on commit 436ac78

Please sign in to comment.