Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update yaml pipe operator #4

Merged
merged 1 commit into from
Sep 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 27 additions & 27 deletions internal/test_helpers/course_definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ name: "Build your own grep"
short_name: "grep"
release_status: "alpha"

description_md: |
description_md: |-
[Regular expressions](https://en.wikipedia.org/wiki/Regular_expression) (Regexes, for short) are patterns used to
match character combinations in strings. [`grep`](https://en.wikipedia.org/wiki/Grep) is a CLI tool for searching
using Regexes.

In this challenge you'll build your own implementation of `grep`. Along the way we'll learn about Regex syntax and
how Regexes are evaluated.

short_description_md: |
short_description_md: |-
Learn how regular expressions work, including character classes, quantifiers and more

completion_percentage: 30
Expand All @@ -35,15 +35,15 @@ marketing:
author_description: "Senior Software Developer, CenturyLink"
author_avatar: "https://codecrafters.io/images/testimonials/patrick_burris.jpeg"
link: "https://github.com/Jumballaya"
text: |
text: |-
I think the instant feedback right there in the git push is really cool.
Didn't even know that was possible!

stages:
- slug: "init"
name: "Match a literal character"
difficulty: very_easy
description_md: |
description_md: |-
In this stage, we'll handle the simplest regex possible: a single character.

**Example:** `a` should match "apple", but not "dog".
Expand All @@ -58,7 +58,7 @@ stages:
for metacharacters like `+`, `?` etc.). We'll use this flag in all stages.

You program must [exit](https://en.wikipedia.org/wiki/Exit_status) with 0 if the character is found, and 1 if not.
marketing_md: |
marketing_md: |-
In this stage, we'll handle the simplest regex possible: a single character.

**Example:**
Expand All @@ -68,7 +68,7 @@ stages:
- slug: "match_digit"
name: "Match digits"
difficulty: very_easy
description_md: |
description_md: |-
In this stage, we'll implement support for the `\d`
[character class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes).

Expand All @@ -83,7 +83,7 @@ stages:
```

You program must exit with 0 if a digit is found in the string, and 1 if not.
marketing_md: |
marketing_md: |-
In this stage, we'll implement support for the `\d`
[character class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes).

Expand All @@ -96,7 +96,7 @@ stages:
- slug: "match_alphanumeric"
name: "Match alphanumeric characters"
difficulty: very_easy
description_md: |
description_md: |-
In this stage, we'll implement support for the `\w`
[character class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes).

Expand All @@ -111,7 +111,7 @@ stages:
```

You program must exit with 0 if an alphanumeric character is found in the string, and 1 if not.
marketing_md: |
marketing_md: |-
In this stage, we'll implement support for the `\w`
[character class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Character_Classes).

Expand All @@ -124,7 +124,7 @@ stages:
- slug: "positive_character_groups"
name: "Positive Character Groups"
difficulty: medium
description_md: |
description_md: |-
In this stage, we'll add support for [positive character groups](https://docs.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#positive-character-group--).

Positive character groups match any character that is present within a pair of square brackets.
Expand All @@ -138,7 +138,7 @@ stages:
```

You program must exit with 0 if an any of the characters are found in the string, and 1 if not.
marketing_md: |
marketing_md: |-
In this stage, we'll add support for [positive character groups](https://docs.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#positive-character-group--).

Positive character groups match any character that is present within a pair of square brackets.
Expand All @@ -150,7 +150,7 @@ stages:
- slug: "negative_character_groups"
name: "Negative Character Groups"
difficulty: medium
description_md: |
description_md: |-
In this stage, we'll add support for [negative character groups](https://docs.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#negative-character-group-).

Negative character groups match any character that is not present within a pair of square brackets.
Expand All @@ -164,7 +164,7 @@ stages:
```

You program must exit with 0 if the input contains characters that aren't part of the negative character group, and 1 if not.
marketing_md: |
marketing_md: |-
In this stage, we'll add support for [negative character groups](https://docs.microsoft.com/en-us/dotnet/standard/base-types/character-classes-in-regular-expressions#negative-character-group-).

Negative character groups match any character that is not present within a pair of square brackets.
Expand All @@ -176,7 +176,7 @@ stages:
- slug: "combining_character_classes"
name: "Combining Character Classes"
difficulty: medium
description_md: |
description_md: |-
In this stage, we'll add support for patterns that combine the character classes we've seen so far.

This is where your regex matcher will start to _feel_ useful.
Expand All @@ -200,7 +200,7 @@ stages:
```

You program must exit with 0 if the pattern matches the input, and 1 if not.
marketing_md: |
marketing_md: |-
In this stage, we'll support patterns that combine the character classes we've seen so far.

**Examples:**
Expand All @@ -215,7 +215,7 @@ stages:
- slug: "start_of_string_anchor"
name: "Start of string anchor"
difficulty: medium
description_md: |
description_md: |-
In this stage, we'll add support for `^`, the [Start of String or Line anchor](https://docs.microsoft.com/en-us/dotnet/standard/base-types/anchors-in-regular-expressions#start-of-string-or-line-).

`^` doesn't match a character, it matches the start of a line.
Expand All @@ -229,7 +229,7 @@ stages:
```

You program must exit with 0 if the input starts with the given pattern, and 1 if not.
marketing_md: |
marketing_md: |-
In this stage, we'll add support for `^`, the [Start of String or Line anchor](https://docs.microsoft.com/en-us/dotnet/standard/base-types/anchors-in-regular-expressions#start-of-string-or-line-).

`^` doesn't match a character, it matches the start of a line.
Expand All @@ -241,15 +241,15 @@ stages:
- slug: "end_of_string_anchor"
name: "End of string anchor"
difficulty: medium
description_md: |
description_md: |-
In this stage, we'll add support for `$`, the [End of String or Line anchor](https://docs.microsoft.com/en-us/dotnet/standard/base-types/anchors-in-regular-expressions#start-of-string-or-line-).

`$` doesn't match a character, it matches the end of a line.

**Example:**

`dog$` should match "dog", but not "dogs".
marketing_md: |
marketing_md: |-
In this stage, we'll add support for `$`, the [End of String or Line anchor](https://docs.microsoft.com/en-us/dotnet/standard/base-types/anchors-in-regular-expressions#start-of-string-or-line-).

`$` doesn't match a character, it matches the end of a line.
Expand All @@ -261,13 +261,13 @@ stages:
- slug: "one_or_more_quantifier"
name: "Match one or more times"
difficulty: hard
description_md: |
description_md: |-
In this stage, we'll add support for `+`, the [one or more](https://docs.microsoft.com/en-us/dotnet/standard/base-types/quantifiers-in-regular-expressions#match-one-or-more-times-) quantifier.

**Example**:

- `a+` should match "apple" and "SaaS", but not "dog".
marketing_md: |
marketing_md: |-
In this stage, we'll add support for `+`, the [one or more](https://docs.microsoft.com/en-us/dotnet/standard/base-types/quantifiers-in-regular-expressions#match-one-or-more-times-) quantifier.

**Example**:
Expand All @@ -277,13 +277,13 @@ stages:
- slug: "zero_or_one_quantifier"
name: "Match zero or one times"
difficulty: hard
description_md: |
description_md: |-
In this stage, we'll add support for `?`, the [zero or one](https://docs.microsoft.com/en-us/dotnet/standard/base-types/quantifiers-in-regular-expressions#match-one-or-more-times-) quantifier (also known as the "optional" quantifier).

**Example**:

- `dogs?` should match "dogs" and "dog", but not "cat".
marketing_md: |
marketing_md: |-
In this stage, we'll add support for `?`, the [zero or one](https://docs.microsoft.com/en-us/dotnet/standard/base-types/quantifiers-in-regular-expressions#match-one-or-more-times-) quantifier (also known as the "optional" quantifier).

**Example**:
Expand All @@ -293,13 +293,13 @@ stages:
- slug: "wildcard"
name: "Wildcard"
difficulty: medium
description_md: |
description_md: |-
In this stage, we'll add support for `.`, which matches any character.

**Example**:

- `d.g` should match "dog", but not "cog".
marketing_md: |
marketing_md: |-
In this stage, we'll add support for `.`, which matches any character.

**Example**:
Expand All @@ -310,13 +310,13 @@ stages:
- slug: "alternation"
name: "Alternation"
difficulty: hard
description_md: |
description_md: |-
In this stage, we'll add support for the `|` keyword, which allows combining multiple patterns in an either/or fashion.

**Example**:

- `(cat|dog)` should match "dog" and "cat", but not "apple".
marketing_md: |
marketing_md: |-
In this stage, we'll add support for the `|` keyword, which allows combining multiple patterns in an either/or fashion.

**Example**:
Expand Down