From 7cdcbcf605d7ecc53ffc1453b4c23655eb12c676 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:04 +0000 Subject: [PATCH 001/159] New translations meta.yml (Romanian) --- ro-RO/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ro-RO/meta.yml diff --git a/ro-RO/meta.yml b/ro-RO/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/ro-RO/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 38264947db3073f2753a270198142355e40c92b5 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:09 +0000 Subject: [PATCH 002/159] New translations step_2.md (Danish) --- da-DK/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 da-DK/step_2.md diff --git a/da-DK/step_2.md b/da-DK/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/da-DK/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From b35fdf7541a471a4f781a56ccc686c76134a8e64 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:11 +0000 Subject: [PATCH 003/159] New translations step_2.md (Catalan) --- ca-ES/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ca-ES/step_2.md diff --git a/ca-ES/step_2.md b/ca-ES/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/ca-ES/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 332c1200953173aee1b0c0a62aa62b9a0121d2af Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:12 +0000 Subject: [PATCH 004/159] New translations step_3.md (Catalan) --- ca-ES/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ca-ES/step_3.md diff --git a/ca-ES/step_3.md b/ca-ES/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/ca-ES/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 3fbc720ada280b8f898ce0a96d351856c8d49fd8 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:14 +0000 Subject: [PATCH 005/159] New translations meta.yml (Czech) --- cs-CZ/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 cs-CZ/meta.yml diff --git a/cs-CZ/meta.yml b/cs-CZ/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/cs-CZ/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From b3608f759a93398bb429a86f7feef623e0a27b0d Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:15 +0000 Subject: [PATCH 006/159] New translations step_1.md (Czech) --- cs-CZ/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 cs-CZ/step_1.md diff --git a/cs-CZ/step_1.md b/cs-CZ/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/cs-CZ/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 5ee10dc35d9199e7e1d99e87b190636224c3d9d3 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:17 +0000 Subject: [PATCH 007/159] New translations step_2.md (Czech) --- cs-CZ/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 cs-CZ/step_2.md diff --git a/cs-CZ/step_2.md b/cs-CZ/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/cs-CZ/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 80b8c57289806f0c7084dcda6ebc4ed5b1610d17 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:18 +0000 Subject: [PATCH 008/159] New translations step_3.md (Czech) --- cs-CZ/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 cs-CZ/step_3.md diff --git a/cs-CZ/step_3.md b/cs-CZ/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/cs-CZ/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From cb897f87fba26e2ccff4324a0556e388f8baaca1 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:19 +0000 Subject: [PATCH 009/159] New translations step_1.md (Danish) --- da-DK/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 da-DK/step_1.md diff --git a/da-DK/step_1.md b/da-DK/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/da-DK/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 4334ddd6ad75c53a69eee23049f2f88212353609 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:21 +0000 Subject: [PATCH 010/159] New translations step_3.md (Danish) --- da-DK/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 da-DK/step_3.md diff --git a/da-DK/step_3.md b/da-DK/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/da-DK/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From fff4a1d4826f2b8d89b95e1871a56ad3513e2151 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:22 +0000 Subject: [PATCH 011/159] New translations meta.yml (Catalan) --- ca-ES/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ca-ES/meta.yml diff --git a/ca-ES/meta.yml b/ca-ES/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/ca-ES/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 85fcbd7a2d4f25980de1b3af714c3013d652394b Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:24 +0000 Subject: [PATCH 012/159] New translations meta.yml (German) --- de-DE/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 de-DE/meta.yml diff --git a/de-DE/meta.yml b/de-DE/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/de-DE/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 1b9ef5f32d4c37a7702c0128242e633f0dcf45d2 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:25 +0000 Subject: [PATCH 013/159] New translations step_1.md (German) --- de-DE/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 de-DE/step_1.md diff --git a/de-DE/step_1.md b/de-DE/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/de-DE/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From d98bb23a60bea28de0b98ad3671d32b1cc002b39 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:26 +0000 Subject: [PATCH 014/159] New translations step_2.md (German) --- de-DE/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 de-DE/step_2.md diff --git a/de-DE/step_2.md b/de-DE/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/de-DE/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 252e1a2db55f658a9ac4c6387a5b4a9b23583af2 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:28 +0000 Subject: [PATCH 015/159] New translations step_3.md (German) --- de-DE/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 de-DE/step_3.md diff --git a/de-DE/step_3.md b/de-DE/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/de-DE/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 04746bd9873b54de46c4bb5c204179db0ca8cd96 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:29 +0000 Subject: [PATCH 016/159] New translations meta.yml (Greek) --- el-GR/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 el-GR/meta.yml diff --git a/el-GR/meta.yml b/el-GR/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/el-GR/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 0d0d74f2987401e2755c7cfb05822853825442bf Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:30 +0000 Subject: [PATCH 017/159] New translations step_1.md (Greek) --- el-GR/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 el-GR/step_1.md diff --git a/el-GR/step_1.md b/el-GR/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/el-GR/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 008f7973ec05647d5f878afd43579f8c1d453b1a Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:32 +0000 Subject: [PATCH 018/159] New translations step_1.md (Romanian) --- ro-RO/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ro-RO/step_1.md diff --git a/ro-RO/step_1.md b/ro-RO/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/ro-RO/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 2b0e4384eafc09f0d502395e5e6460981fc9c2d1 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:33 +0000 Subject: [PATCH 019/159] New translations step_1.md (Catalan) --- ca-ES/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ca-ES/step_1.md diff --git a/ca-ES/step_1.md b/ca-ES/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/ca-ES/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 0fcfbdc32d1b6eae5e74c60bec606cc8c71c79c8 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:34 +0000 Subject: [PATCH 020/159] New translations meta.yml (Danish) --- da-DK/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 da-DK/meta.yml diff --git a/da-DK/meta.yml b/da-DK/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/da-DK/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 152cdd0eea2f1bb7b40c1e05e1cd564f2306b5ed Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:36 +0000 Subject: [PATCH 021/159] New translations step_3.md (Arabic) --- ar-SA/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ar-SA/step_3.md diff --git a/ar-SA/step_3.md b/ar-SA/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/ar-SA/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 5aa05ad80a9d37d5dbb0fcc1dc965b9e74edfc92 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:37 +0000 Subject: [PATCH 022/159] New translations step_2.md (Spanish) --- es-ES/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 es-ES/step_2.md diff --git a/es-ES/step_2.md b/es-ES/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/es-ES/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From abe568ecc01ed0bcf9098cecac908d183f586ddf Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:38 +0000 Subject: [PATCH 023/159] New translations step_2.md (Arabic) --- ar-SA/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ar-SA/step_2.md diff --git a/ar-SA/step_2.md b/ar-SA/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/ar-SA/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 6ceb5774f4321b2a6bc1f51d1e1b236071520a2b Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:39 +0000 Subject: [PATCH 024/159] New translations step_3.md (Romanian) --- ro-RO/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ro-RO/step_3.md diff --git a/ro-RO/step_3.md b/ro-RO/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/ro-RO/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 38fabb7d64dcc0068e5fc77a62babcc461f15696 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:41 +0000 Subject: [PATCH 025/159] New translations meta.yml (French) --- fr-FR/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 fr-FR/meta.yml diff --git a/fr-FR/meta.yml b/fr-FR/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/fr-FR/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 0f70d9e6a7ca703ee48756e4bd5abccac22b97af Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:42 +0000 Subject: [PATCH 026/159] New translations step_1.md (French) --- fr-FR/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 fr-FR/step_1.md diff --git a/fr-FR/step_1.md b/fr-FR/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/fr-FR/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From cebbeee3b39155547befb9f8c29447ea85775fd9 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:43 +0000 Subject: [PATCH 027/159] New translations step_2.md (French) --- fr-FR/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 fr-FR/step_2.md diff --git a/fr-FR/step_2.md b/fr-FR/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/fr-FR/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 796623b165c1ca476f276d8adf4595f21862e9e0 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:45 +0000 Subject: [PATCH 028/159] New translations step_3.md (French) --- fr-FR/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 fr-FR/step_3.md diff --git a/fr-FR/step_3.md b/fr-FR/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/fr-FR/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 27b01e10f3b1a6f4c54a849a3ac4122e1b1b1949 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:46 +0000 Subject: [PATCH 029/159] New translations step_1.md (Spanish) --- es-ES/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 es-ES/step_1.md diff --git a/es-ES/step_1.md b/es-ES/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/es-ES/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 6258c7f6d6a3f835d9e145735721ee84a2fd1dc5 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:47 +0000 Subject: [PATCH 030/159] New translations meta.yml (Spanish) --- es-ES/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 es-ES/meta.yml diff --git a/es-ES/meta.yml b/es-ES/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/es-ES/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From d7b4a6a11d731b34f81cf72a54312e5641328ad6 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:49 +0000 Subject: [PATCH 031/159] New translations step_3.md (Spanish) --- es-ES/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 es-ES/step_3.md diff --git a/es-ES/step_3.md b/es-ES/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/es-ES/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From def9120c361d64673fc18baf622bebe10bf7aa7e Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:50 +0000 Subject: [PATCH 032/159] New translations step_2.md (Romanian) --- ro-RO/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ro-RO/step_2.md diff --git a/ro-RO/step_2.md b/ro-RO/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/ro-RO/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 24feaabe4ba5ac0726ed7301d4b8c348423414d8 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:51 +0000 Subject: [PATCH 033/159] New translations meta.yml (Afrikaans) --- af-ZA/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 af-ZA/meta.yml diff --git a/af-ZA/meta.yml b/af-ZA/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/af-ZA/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From a61ebe092722727b8a62065557ea61e14bdd7d67 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:52 +0000 Subject: [PATCH 034/159] New translations step_1.md (Afrikaans) --- af-ZA/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 af-ZA/step_1.md diff --git a/af-ZA/step_1.md b/af-ZA/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/af-ZA/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 2180a23538fc6819eed8c43e34ca4a500724e44a Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:54 +0000 Subject: [PATCH 035/159] New translations step_2.md (Afrikaans) --- af-ZA/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 af-ZA/step_2.md diff --git a/af-ZA/step_2.md b/af-ZA/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/af-ZA/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 5564b9cdf3f27840d80b93307fd66ac5e23d3691 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:55 +0000 Subject: [PATCH 036/159] New translations step_3.md (Afrikaans) --- af-ZA/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 af-ZA/step_3.md diff --git a/af-ZA/step_3.md b/af-ZA/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/af-ZA/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 6eb0937edea08647fcbb5c5c8654ea55517e0045 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:56 +0000 Subject: [PATCH 037/159] New translations meta.yml (Arabic) --- ar-SA/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ar-SA/meta.yml diff --git a/ar-SA/meta.yml b/ar-SA/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/ar-SA/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From b6196184520fd8536162a13e54772dfa7d566ffd Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:58 +0000 Subject: [PATCH 038/159] New translations step_1.md (Arabic) --- ar-SA/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ar-SA/step_1.md diff --git a/ar-SA/step_1.md b/ar-SA/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/ar-SA/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 721fbfecbdbd119d34b9ecb3308423eb69f269b8 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:43:59 +0000 Subject: [PATCH 039/159] New translations step_2.md (Swedish) --- sv-SE/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sv-SE/step_2.md diff --git a/sv-SE/step_2.md b/sv-SE/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/sv-SE/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 02b0581ef98871e046e5be85a274011d239837e9 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:00 +0000 Subject: [PATCH 040/159] New translations meta.yml (Ukrainian) --- uk-UA/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 uk-UA/meta.yml diff --git a/uk-UA/meta.yml b/uk-UA/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/uk-UA/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 601d4bd39ca710e8474947fdda62bb473f765201 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:02 +0000 Subject: [PATCH 041/159] New translations step_3.md (Turkish) --- tr-TR/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 tr-TR/step_3.md diff --git a/tr-TR/step_3.md b/tr-TR/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/tr-TR/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 13a009461533f632216493bb93ed6a138def0b01 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:04 +0000 Subject: [PATCH 042/159] New translations step_2.md (Turkish) --- tr-TR/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tr-TR/step_2.md diff --git a/tr-TR/step_2.md b/tr-TR/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/tr-TR/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 6b72f674dead7b701bf96a33a77d4dd5cedf64a3 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:05 +0000 Subject: [PATCH 043/159] New translations step_1.md (Turkish) --- tr-TR/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 tr-TR/step_1.md diff --git a/tr-TR/step_1.md b/tr-TR/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/tr-TR/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 3c472efd3406ef86f71530d8b910f4a781140e78 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:06 +0000 Subject: [PATCH 044/159] New translations meta.yml (Turkish) --- tr-TR/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tr-TR/meta.yml diff --git a/tr-TR/meta.yml b/tr-TR/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/tr-TR/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From e0f1716c4eca5441e1774b7e6e38bf3c76e35e7a Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:08 +0000 Subject: [PATCH 045/159] New translations step_3.md (Swedish) --- sv-SE/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sv-SE/step_3.md diff --git a/sv-SE/step_3.md b/sv-SE/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/sv-SE/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 8ee38a2bf606467519f3876d05736a72e0b04a48 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:09 +0000 Subject: [PATCH 046/159] New translations step_1.md (Russian) --- ru-RU/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ru-RU/step_1.md diff --git a/ru-RU/step_1.md b/ru-RU/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/ru-RU/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From bd7810274eabc9b7aa6a4a721df5c991abbebcec Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:11 +0000 Subject: [PATCH 047/159] New translations step_1.md (Swedish) --- sv-SE/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sv-SE/step_1.md diff --git a/sv-SE/step_1.md b/sv-SE/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/sv-SE/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 9647e0f009e62e4cf6ba031c37da8f05a9ada37f Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:12 +0000 Subject: [PATCH 048/159] New translations meta.yml (Swedish) --- sv-SE/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sv-SE/meta.yml diff --git a/sv-SE/meta.yml b/sv-SE/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/sv-SE/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 62427a2af9cfa4f47cfe43fa36e73b06d7abc56a Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:14 +0000 Subject: [PATCH 049/159] New translations step_3.md (Serbian (Cyrillic)) --- sr-SP/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 sr-SP/step_3.md diff --git a/sr-SP/step_3.md b/sr-SP/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/sr-SP/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 805008a1997c987166146ba37a75950954109d54 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:15 +0000 Subject: [PATCH 050/159] New translations step_2.md (Serbian (Cyrillic)) --- sr-SP/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 sr-SP/step_2.md diff --git a/sr-SP/step_2.md b/sr-SP/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/sr-SP/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 69b0b1134eec6880b84ada6d120803e9b6560aaa Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:16 +0000 Subject: [PATCH 051/159] New translations step_1.md (Serbian (Cyrillic)) --- sr-SP/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 sr-SP/step_1.md diff --git a/sr-SP/step_1.md b/sr-SP/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/sr-SP/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From f38e8c42dd561881e7833ed62759b18c0f45b156 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:18 +0000 Subject: [PATCH 052/159] New translations meta.yml (Serbian (Cyrillic)) --- sr-SP/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sr-SP/meta.yml diff --git a/sr-SP/meta.yml b/sr-SP/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/sr-SP/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From c68448b6adb1ef02729f76618bd04a5d60597894 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:19 +0000 Subject: [PATCH 053/159] New translations step_3.md (Russian) --- ru-RU/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ru-RU/step_3.md diff --git a/ru-RU/step_3.md b/ru-RU/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/ru-RU/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 6b538730b876dbf2beb152269b6ac071f4986a10 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:21 +0000 Subject: [PATCH 054/159] New translations step_2.md (Russian) --- ru-RU/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ru-RU/step_2.md diff --git a/ru-RU/step_2.md b/ru-RU/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/ru-RU/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 69f70a008ef40cc7f6c6d9c0d0007ebfd281933b Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:22 +0000 Subject: [PATCH 055/159] New translations step_2.md (Ukrainian) --- uk-UA/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 uk-UA/step_2.md diff --git a/uk-UA/step_2.md b/uk-UA/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/uk-UA/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 10e58a3a5fcf6903ae1a442f229157d6ed812222 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:24 +0000 Subject: [PATCH 056/159] New translations step_1.md (Ukrainian) --- uk-UA/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 uk-UA/step_1.md diff --git a/uk-UA/step_1.md b/uk-UA/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/uk-UA/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 8ad8cc460a782fe9e8e255bf8bcf25e65ef69cd5 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:26 +0000 Subject: [PATCH 057/159] New translations step_1.md (Portuguese, Brazilian) --- pt-BR/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pt-BR/step_1.md diff --git a/pt-BR/step_1.md b/pt-BR/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/pt-BR/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 22d702c65c9663ccbc6245d075e593f75ecc006b Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:27 +0000 Subject: [PATCH 058/159] New translations step_3.md (Ukrainian) --- uk-UA/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 uk-UA/step_3.md diff --git a/uk-UA/step_3.md b/uk-UA/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/uk-UA/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From f920a7647c737f34904dc2f8caa039bde7d52e15 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:28 +0000 Subject: [PATCH 059/159] New translations step_2.md (English) --- en-US/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 en-US/step_2.md diff --git a/en-US/step_2.md b/en-US/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/en-US/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 22a0b0bbb6eb6010040623201a9f6f22fa88d70d Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:30 +0000 Subject: [PATCH 060/159] New translations step_2.md (Portuguese, Brazilian) --- pt-BR/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pt-BR/step_2.md diff --git a/pt-BR/step_2.md b/pt-BR/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/pt-BR/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 45dc5ef249fbeec8731ce31941216db65df9c477 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:31 +0000 Subject: [PATCH 061/159] New translations step_3.md (Portuguese) --- pt-PT/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pt-PT/step_3.md diff --git a/pt-PT/step_3.md b/pt-PT/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/pt-PT/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From f8172cd3b0cf5baf211ba41024e2ad6a7b86737f Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:33 +0000 Subject: [PATCH 062/159] New translations meta.yml (Portuguese, Brazilian) --- pt-BR/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 pt-BR/meta.yml diff --git a/pt-BR/meta.yml b/pt-BR/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/pt-BR/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From edd1863fb3ede4e5e80352c9a32c72864d5939d7 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:34 +0000 Subject: [PATCH 063/159] New translations step_3.md (Vietnamese) --- vi-VN/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 vi-VN/step_3.md diff --git a/vi-VN/step_3.md b/vi-VN/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/vi-VN/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 6d8e6fe6fcc007bee9a5b3985b9168922e69521a Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:35 +0000 Subject: [PATCH 064/159] New translations step_2.md (Vietnamese) --- vi-VN/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 vi-VN/step_2.md diff --git a/vi-VN/step_2.md b/vi-VN/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/vi-VN/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 45182cf3e1e5a2d17de76a8119e2f317018e3cae Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:37 +0000 Subject: [PATCH 065/159] New translations step_1.md (Vietnamese) --- vi-VN/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 vi-VN/step_1.md diff --git a/vi-VN/step_1.md b/vi-VN/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/vi-VN/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 849f8118a27d77c211db7f596852dbcb3f30607a Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:38 +0000 Subject: [PATCH 066/159] New translations meta.yml (Vietnamese) --- vi-VN/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 vi-VN/meta.yml diff --git a/vi-VN/meta.yml b/vi-VN/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/vi-VN/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From a0c636d7a943600be2f4ef6269306a30a110dc54 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:39 +0000 Subject: [PATCH 067/159] New translations step_3.md (English) --- en-US/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 en-US/step_3.md diff --git a/en-US/step_3.md b/en-US/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/en-US/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From c271f22fe6793769d61c2289a44d739488bd71d3 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:41 +0000 Subject: [PATCH 068/159] New translations step_1.md (English) --- en-US/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 en-US/step_1.md diff --git a/en-US/step_1.md b/en-US/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/en-US/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From bf13e63cd916bb1f9883da981449bd1156bf9a10 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:42 +0000 Subject: [PATCH 069/159] New translations meta.yml (Chinese Simplified) --- zh-CN/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 zh-CN/meta.yml diff --git a/zh-CN/meta.yml b/zh-CN/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/zh-CN/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 7c449a38f8d797d697d06a5767dcad527a429da4 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:43 +0000 Subject: [PATCH 070/159] New translations meta.yml (English) --- en-US/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 en-US/meta.yml diff --git a/en-US/meta.yml b/en-US/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/en-US/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 072e978a5288621825e8801808122411e8d3d1ea Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:44 +0000 Subject: [PATCH 071/159] New translations step_3.md (Chinese Traditional) --- zh-TW/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 zh-TW/step_3.md diff --git a/zh-TW/step_3.md b/zh-TW/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/zh-TW/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From cd0c11d801515c9a232e9ec1d7102baa93bd02a4 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:46 +0000 Subject: [PATCH 072/159] New translations step_2.md (Chinese Traditional) --- zh-TW/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 zh-TW/step_2.md diff --git a/zh-TW/step_2.md b/zh-TW/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/zh-TW/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 38df0522637d6f07c224a0ad6f664b5962c7a40e Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:47 +0000 Subject: [PATCH 073/159] New translations step_1.md (Chinese Traditional) --- zh-TW/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 zh-TW/step_1.md diff --git a/zh-TW/step_1.md b/zh-TW/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/zh-TW/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 9a8a1c54df7c1c7a67a2b9af04b840dcfdc0911e Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:49 +0000 Subject: [PATCH 074/159] New translations meta.yml (Chinese Traditional) --- zh-TW/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 zh-TW/meta.yml diff --git a/zh-TW/meta.yml b/zh-TW/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/zh-TW/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 0257683238651a9d3f97cbf5fd36f160c7f18322 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:50 +0000 Subject: [PATCH 075/159] New translations step_3.md (Chinese Simplified) --- zh-CN/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 zh-CN/step_3.md diff --git a/zh-CN/step_3.md b/zh-CN/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/zh-CN/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From e22da55655ce85f9e0a52140c19ea5f024e06611 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:51 +0000 Subject: [PATCH 076/159] New translations step_2.md (Chinese Simplified) --- zh-CN/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 zh-CN/step_2.md diff --git a/zh-CN/step_2.md b/zh-CN/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/zh-CN/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From d9a518410904c1c861cdc4b746758c0413ef6b09 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:53 +0000 Subject: [PATCH 077/159] New translations step_1.md (Chinese Simplified) --- zh-CN/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 zh-CN/step_1.md diff --git a/zh-CN/step_1.md b/zh-CN/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/zh-CN/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From fb361973d9be7a4c00bab3d426966d48deb99884 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:54 +0000 Subject: [PATCH 078/159] New translations meta.yml (Russian) --- ru-RU/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ru-RU/meta.yml diff --git a/ru-RU/meta.yml b/ru-RU/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/ru-RU/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 36fca2052b0a8e9b2b26692531b476f78f2cbbda Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:55 +0000 Subject: [PATCH 079/159] New translations meta.yml (Korean) --- ko-KR/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ko-KR/meta.yml diff --git a/ko-KR/meta.yml b/ko-KR/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/ko-KR/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 48666f80b311c05672e96d99f872e02e51f9ec6d Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:57 +0000 Subject: [PATCH 080/159] New translations step_2.md (Portuguese) --- pt-PT/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pt-PT/step_2.md diff --git a/pt-PT/step_2.md b/pt-PT/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/pt-PT/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From b5c5533a28c11fb75e682af07cc293811d925202 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:58 +0000 Subject: [PATCH 081/159] New translations step_3.md (Hebrew) --- he-IL/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 he-IL/step_3.md diff --git a/he-IL/step_3.md b/he-IL/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/he-IL/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 627659297a06044d0ddc2cec9e631ccc6b6af2af Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:44:59 +0000 Subject: [PATCH 082/159] New translations step_2.md (Italian) --- it-IT/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 it-IT/step_2.md diff --git a/it-IT/step_2.md b/it-IT/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/it-IT/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 2cb34be85214d7fda2e7ae128c16cab9adc6bdd6 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:01 +0000 Subject: [PATCH 083/159] New translations step_1.md (Italian) --- it-IT/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 it-IT/step_1.md diff --git a/it-IT/step_1.md b/it-IT/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/it-IT/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 544d8ce8e2ffe31deda557829fa496c95451ab21 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:02 +0000 Subject: [PATCH 084/159] New translations meta.yml (Italian) --- it-IT/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 it-IT/meta.yml diff --git a/it-IT/meta.yml b/it-IT/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/it-IT/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 6144fe8d09a59069418133dcf9d154c69416eaf1 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:04 +0000 Subject: [PATCH 085/159] New translations step_3.md (Hungarian) --- hu-HU/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 hu-HU/step_3.md diff --git a/hu-HU/step_3.md b/hu-HU/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/hu-HU/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 28415ff1e6357873a42cebd770634bd0660c3355 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:06 +0000 Subject: [PATCH 086/159] New translations step_2.md (Hungarian) --- hu-HU/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 hu-HU/step_2.md diff --git a/hu-HU/step_2.md b/hu-HU/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/hu-HU/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From bcb5549cf5afd3632ef53a09555242d4695044da Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:07 +0000 Subject: [PATCH 087/159] New translations step_1.md (Hungarian) --- hu-HU/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 hu-HU/step_1.md diff --git a/hu-HU/step_1.md b/hu-HU/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/hu-HU/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From a604aa832ed6d562417d70f7e3419b12cc238425 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:08 +0000 Subject: [PATCH 088/159] New translations meta.yml (Hungarian) --- hu-HU/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 hu-HU/meta.yml diff --git a/hu-HU/meta.yml b/hu-HU/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/hu-HU/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 5d14df96b246e6d9290d33a182489ed8658a0f51 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:10 +0000 Subject: [PATCH 089/159] New translations step_2.md (Hebrew) --- he-IL/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 he-IL/step_2.md diff --git a/he-IL/step_2.md b/he-IL/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/he-IL/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 7cd34c3e1b7a54053e35e0174cb73a777c041d30 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:11 +0000 Subject: [PATCH 090/159] New translations meta.yml (Japanese) --- ja-JP/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 ja-JP/meta.yml diff --git a/ja-JP/meta.yml b/ja-JP/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/ja-JP/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 6c473bb99eedc6bad2e9adf03a89198a20cc4387 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:13 +0000 Subject: [PATCH 091/159] New translations step_1.md (Hebrew) --- he-IL/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 he-IL/step_1.md diff --git a/he-IL/step_1.md b/he-IL/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/he-IL/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From c1405e2c849dab7aa54fb2dc1045d59d8b2a8ba4 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:14 +0000 Subject: [PATCH 092/159] New translations meta.yml (Hebrew) --- he-IL/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 he-IL/meta.yml diff --git a/he-IL/meta.yml b/he-IL/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/he-IL/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 3e183cddda854300019f3e760604a847e751ebdd Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:16 +0000 Subject: [PATCH 093/159] New translations step_3.md (Finnish) --- fi-FI/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 fi-FI/step_3.md diff --git a/fi-FI/step_3.md b/fi-FI/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/fi-FI/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From eb9ae6f2d997f918171f153541c268a49a202e84 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:17 +0000 Subject: [PATCH 094/159] New translations step_2.md (Finnish) --- fi-FI/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 fi-FI/step_2.md diff --git a/fi-FI/step_2.md b/fi-FI/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/fi-FI/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From fdbf8d9ddaaeb15eb94cade4fdbc3b11b0d457d2 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:19 +0000 Subject: [PATCH 095/159] New translations step_1.md (Finnish) --- fi-FI/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 fi-FI/step_1.md diff --git a/fi-FI/step_1.md b/fi-FI/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/fi-FI/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From ab204cb4bb1f4a7f51fcb7b12df7c5dcf5f795fe Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:20 +0000 Subject: [PATCH 096/159] New translations meta.yml (Finnish) --- fi-FI/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 fi-FI/meta.yml diff --git a/fi-FI/meta.yml b/fi-FI/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/fi-FI/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From d96f89663cd5ceff03d41ef22a66666e2bddc31d Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:22 +0000 Subject: [PATCH 097/159] New translations step_3.md (Greek) --- el-GR/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 el-GR/step_3.md diff --git a/el-GR/step_3.md b/el-GR/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/el-GR/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 071d7543cfe4b514aae95d572caed093b94283b4 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:24 +0000 Subject: [PATCH 098/159] New translations step_2.md (Greek) --- el-GR/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 el-GR/step_2.md diff --git a/el-GR/step_2.md b/el-GR/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/el-GR/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 480b70d381b1662b1d3548babd0767885c1dd7ce Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:25 +0000 Subject: [PATCH 099/159] New translations step_3.md (Italian) --- it-IT/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 it-IT/step_3.md diff --git a/it-IT/step_3.md b/it-IT/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/it-IT/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 1e41bd5f0ce5dd6d48285d3fff85b5d532d06263 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:26 +0000 Subject: [PATCH 100/159] New translations step_1.md (Japanese) --- ja-JP/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ja-JP/step_1.md diff --git a/ja-JP/step_1.md b/ja-JP/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/ja-JP/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 21baa43be41843b1fae8856057e32923c043ec68 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:28 +0000 Subject: [PATCH 101/159] New translations step_1.md (Portuguese) --- pt-PT/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pt-PT/step_1.md diff --git a/pt-PT/step_1.md b/pt-PT/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/pt-PT/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 2353c8029ae0199e5f39e524548cde565f9d2185 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:29 +0000 Subject: [PATCH 102/159] New translations step_1.md (Norwegian) --- no-NO/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 no-NO/step_1.md diff --git a/no-NO/step_1.md b/no-NO/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/no-NO/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From b9430b5b0ff964537c926584093c3309feb3b745 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:30 +0000 Subject: [PATCH 103/159] New translations meta.yml (Portuguese) --- pt-PT/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 pt-PT/meta.yml diff --git a/pt-PT/meta.yml b/pt-PT/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/pt-PT/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From cf85285761c22fab68df0f07de3bdd2aa4089f31 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:32 +0000 Subject: [PATCH 104/159] New translations step_3.md (Polish) --- pl-PL/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pl-PL/step_3.md diff --git a/pl-PL/step_3.md b/pl-PL/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/pl-PL/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From b9b707fc90e5411fc0c6faab2593ac6979e47bf4 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:33 +0000 Subject: [PATCH 105/159] New translations step_2.md (Polish) --- pl-PL/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 pl-PL/step_2.md diff --git a/pl-PL/step_2.md b/pl-PL/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/pl-PL/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 98c08bb4d965350b67cebcea3b4e8d4b667f7ebd Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:34 +0000 Subject: [PATCH 106/159] New translations step_1.md (Polish) --- pl-PL/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 pl-PL/step_1.md diff --git a/pl-PL/step_1.md b/pl-PL/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/pl-PL/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 41a027027bff04689f5f560e08c248cbfa89d5cc Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:42 +0000 Subject: [PATCH 107/159] New translations meta.yml (Polish) --- pl-PL/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 pl-PL/meta.yml diff --git a/pl-PL/meta.yml b/pl-PL/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/pl-PL/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From f5558cf6f188d3a2e6453d66acf1058d1b816e60 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:44 +0000 Subject: [PATCH 108/159] New translations step_3.md (Norwegian) --- no-NO/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 no-NO/step_3.md diff --git a/no-NO/step_3.md b/no-NO/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/no-NO/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 628cb52ccb3258a2f713dc02dd7e3eacd762ee2d Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:45 +0000 Subject: [PATCH 109/159] New translations step_2.md (Norwegian) --- no-NO/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 no-NO/step_2.md diff --git a/no-NO/step_2.md b/no-NO/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/no-NO/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From e15c2d949b7c918c3817a93a751078593e1381c4 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:46 +0000 Subject: [PATCH 110/159] New translations meta.yml (Norwegian) --- no-NO/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 no-NO/meta.yml diff --git a/no-NO/meta.yml b/no-NO/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/no-NO/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 08fdbc683937c765214e92fcbda63bb1b52b35ac Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:48 +0000 Subject: [PATCH 111/159] New translations step_2.md (Japanese) --- ja-JP/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ja-JP/step_2.md diff --git a/ja-JP/step_2.md b/ja-JP/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/ja-JP/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 9aad50e09446995800decfa6959ccda1ed8f88db Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:49 +0000 Subject: [PATCH 112/159] New translations step_3.md (Dutch) --- nl-NL/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 nl-NL/step_3.md diff --git a/nl-NL/step_3.md b/nl-NL/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/nl-NL/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 9ce3ac3f30fe480b60145c32ed6699d473a32a88 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:50 +0000 Subject: [PATCH 113/159] New translations step_2.md (Dutch) --- nl-NL/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 nl-NL/step_2.md diff --git a/nl-NL/step_2.md b/nl-NL/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/nl-NL/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From e17167e3b0feb3bcd9b8c0737ee3dc97807ce51c Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:52 +0000 Subject: [PATCH 114/159] New translations step_1.md (Dutch) --- nl-NL/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 nl-NL/step_1.md diff --git a/nl-NL/step_1.md b/nl-NL/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/nl-NL/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From 260a7b381d65e65a660a9e25b9719478175003d3 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:53 +0000 Subject: [PATCH 115/159] New translations meta.yml (Dutch) --- nl-NL/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 nl-NL/meta.yml diff --git a/nl-NL/meta.yml b/nl-NL/meta.yml new file mode 100644 index 0000000..f2e3d0a --- /dev/null +++ b/nl-NL/meta.yml @@ -0,0 +1,18 @@ +--- +title: Substitute simple regex patterns with Python +hero_image: images/banner.png +description: Replace character patterns with Python and regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Replacing patterns + From 8086293a746b755035b2ea534437943cb39e709f Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:54 +0000 Subject: [PATCH 116/159] New translations step_3.md (Korean) --- ko-KR/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ko-KR/step_3.md diff --git a/ko-KR/step_3.md b/ko-KR/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/ko-KR/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From ff1402d4c0a8bd9e8b8897ebe26cc364b008c836 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:56 +0000 Subject: [PATCH 117/159] New translations step_2.md (Korean) --- ko-KR/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 ko-KR/step_2.md diff --git a/ko-KR/step_2.md b/ko-KR/step_2.md new file mode 100644 index 0000000..39c4f7b --- /dev/null +++ b/ko-KR/step_2.md @@ -0,0 +1,13 @@ +## What you will need + +### Hardware + ++ List hardware here, or delete section. + +### Software + ++ List software here, or delete section. + +### Additional Resources + ++ List additional resources, or delete section. From 61c6e3f39ee03816bb95ee70ddd88561d1a2c769 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:57 +0000 Subject: [PATCH 118/159] New translations step_1.md (Korean) --- ko-KR/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 ko-KR/step_1.md diff --git a/ko-KR/step_1.md b/ko-KR/step_1.md new file mode 100644 index 0000000..7b57916 --- /dev/null +++ b/ko-KR/step_1.md @@ -0,0 +1,46 @@ +- You can find and replace simple patterns of characters using Python's `re` module. + +- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. + +- First, import the `re` module in your script: + +```python +import re +``` + +- Then create a simple string with which to experiment. + +```python +import re +title = 'Harry Potter' +``` + +- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: + +```python +new_title = re.sub('r', 'i', title) +print(new_title) +``` +- This will give us `'Haiiy Pottei'`. + +- You can also change sequences of characters: + +```python +new_title = re.sub('rr', 'pp', title) +``` + +- Printing `new_title` will now give you `'Happy Potter'`. + +- Of course, you can also substitute whole words. + +```python +new_title = re.sub('Potter', 'Styles', title) +``` + +- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: + +```python +new_title = re.sub('r', 'i', title, 1) +``` + +- This will make the `new_title` variable contain `'Hairy Potter'`. From d9e84b322a8235b6b7696ce63ff08f8e57b695e6 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:45:59 +0000 Subject: [PATCH 119/159] New translations step_3.md (Japanese) --- ja-JP/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 ja-JP/step_3.md diff --git a/ja-JP/step_3.md b/ja-JP/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/ja-JP/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 7abcd8eab71f36407ac74952940baec4834c43e2 Mon Sep 17 00:00:00 2001 From: ninaszymor <33628387+ninaszymor@users.noreply.github.com> Date: Mon, 2 Mar 2020 10:46:00 +0000 Subject: [PATCH 120/159] New translations step_3.md (Portuguese, Brazilian) --- pt-BR/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 pt-BR/step_3.md diff --git a/pt-BR/step_3.md b/pt-BR/step_3.md new file mode 100644 index 0000000..ba237e9 --- /dev/null +++ b/pt-BR/step_3.md @@ -0,0 +1,3 @@ +## Step title + ++ Step content... From 16c2e871691e61f22cbcc25adb4715039b88680a Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:18 +0100 Subject: [PATCH 121/159] New translations .keep (Romanian) --- ro-RO/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 ro-RO/solutions/.keep diff --git a/ro-RO/solutions/.keep b/ro-RO/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ro-RO/solutions/.keep @@ -0,0 +1 @@ + From faeb936e34241bd71944d7c8fc53905d85a0f9e1 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:20 +0100 Subject: [PATCH 122/159] New translations step_2.md (Dutch) --- nl-NL/step_2.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nl-NL/step_2.md b/nl-NL/step_2.md index 39c4f7b..11c786c 100644 --- a/nl-NL/step_2.md +++ b/nl-NL/step_2.md @@ -1,13 +1,13 @@ -## What you will need +## Wat heb je nodig ### Hardware -+ List hardware here, or delete section. ++ Lijst hardware hier, of verwijder sectie. ### Software -+ List software here, or delete section. ++ Lijst software hier, of verwijder sectie. -### Additional Resources +### Aanvullende bronnen -+ List additional resources, or delete section. ++ Maak een lijst met extra bronnen of verwijder de sectie. From 03a9c241892f395611ef229ff585b011e786f7fd Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:21 +0100 Subject: [PATCH 123/159] New translations .keep (Vietnamese) --- vi-VN/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 vi-VN/solutions/.keep diff --git a/vi-VN/solutions/.keep b/vi-VN/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/vi-VN/solutions/.keep @@ -0,0 +1 @@ + From 270c3cb05b16e500ae81db080f3b1edaa406efae Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:22 +0100 Subject: [PATCH 124/159] New translations .keep (English) --- en-US/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 en-US/solutions/.keep diff --git a/en-US/solutions/.keep b/en-US/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/en-US/solutions/.keep @@ -0,0 +1 @@ + From 4c4b569a7bb9f090029969012c76a30acda09ff3 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:24 +0100 Subject: [PATCH 125/159] New translations .keep (Chinese Traditional) --- zh-TW/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 zh-TW/solutions/.keep diff --git a/zh-TW/solutions/.keep b/zh-TW/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/zh-TW/solutions/.keep @@ -0,0 +1 @@ + From e6223731f2eb94a4814ec0b12b8e0be220f1fd7a Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:25 +0100 Subject: [PATCH 126/159] New translations .keep (Chinese Simplified) --- zh-CN/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 zh-CN/solutions/.keep diff --git a/zh-CN/solutions/.keep b/zh-CN/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/zh-CN/solutions/.keep @@ -0,0 +1 @@ + From 3c4c2fcc7084f1de7c067f82e22e8deaaf1a4130 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:26 +0100 Subject: [PATCH 127/159] New translations .keep (Ukrainian) --- uk-UA/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 uk-UA/solutions/.keep diff --git a/uk-UA/solutions/.keep b/uk-UA/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/uk-UA/solutions/.keep @@ -0,0 +1 @@ + From 57fac25f8f09897401fa067f18c401d59a93c5bb Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:27 +0100 Subject: [PATCH 128/159] New translations .keep (Turkish) --- tr-TR/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 tr-TR/solutions/.keep diff --git a/tr-TR/solutions/.keep b/tr-TR/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/tr-TR/solutions/.keep @@ -0,0 +1 @@ + From b3bddeeb66863fc85f7f7f28bd7946352fc3968c Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:28 +0100 Subject: [PATCH 129/159] New translations .keep (Swedish) --- sv-SE/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 sv-SE/solutions/.keep diff --git a/sv-SE/solutions/.keep b/sv-SE/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/sv-SE/solutions/.keep @@ -0,0 +1 @@ + From 761cb8637ba6692009d57a2484ebf91a75c7c79b Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:29 +0100 Subject: [PATCH 130/159] New translations .keep (Serbian (Cyrillic)) --- sr-SP/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 sr-SP/solutions/.keep diff --git a/sr-SP/solutions/.keep b/sr-SP/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/sr-SP/solutions/.keep @@ -0,0 +1 @@ + From 43ad64cfe5e2a8a8f87ff226f7819bcc0340982d Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:30 +0100 Subject: [PATCH 131/159] New translations .keep (Russian) --- ru-RU/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 ru-RU/solutions/.keep diff --git a/ru-RU/solutions/.keep b/ru-RU/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ru-RU/solutions/.keep @@ -0,0 +1 @@ + From 581d20fdb8801f73e3bee8cb9b4a554f112d4f20 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:32 +0100 Subject: [PATCH 132/159] New translations .keep (Portuguese) --- pt-PT/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 pt-PT/solutions/.keep diff --git a/pt-PT/solutions/.keep b/pt-PT/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/pt-PT/solutions/.keep @@ -0,0 +1 @@ + From 876a682c41eebba01f8cda77abe237f309f97e84 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:33 +0100 Subject: [PATCH 133/159] New translations .keep (Polish) --- pl-PL/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 pl-PL/solutions/.keep diff --git a/pl-PL/solutions/.keep b/pl-PL/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/pl-PL/solutions/.keep @@ -0,0 +1 @@ + From df341d63cce6e2fb46e8777108f30336c8cdfb61 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:34 +0100 Subject: [PATCH 134/159] New translations .keep (Norwegian) --- no-NO/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 no-NO/solutions/.keep diff --git a/no-NO/solutions/.keep b/no-NO/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/no-NO/solutions/.keep @@ -0,0 +1 @@ + From a35f80af7a900e56b85bc31e32c0ce665b5e2bd6 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:35 +0100 Subject: [PATCH 135/159] New translations .keep (Dutch) --- nl-NL/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 nl-NL/solutions/.keep diff --git a/nl-NL/solutions/.keep b/nl-NL/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/nl-NL/solutions/.keep @@ -0,0 +1 @@ + From 53f7497d5a66ab64680792959d9bddda276450a3 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:36 +0100 Subject: [PATCH 136/159] New translations step_3.md (Dutch) --- nl-NL/step_3.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nl-NL/step_3.md b/nl-NL/step_3.md index ba237e9..9655857 100644 --- a/nl-NL/step_3.md +++ b/nl-NL/step_3.md @@ -1,3 +1,3 @@ -## Step title +## Stap titel -+ Step content... ++ Stap inhoud ... From 77433668809a1d4c355f6b655f1f924059943196 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:38 +0100 Subject: [PATCH 137/159] New translations step_1.md (Dutch) --- nl-NL/step_1.md | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/nl-NL/step_1.md b/nl-NL/step_1.md index 7b57916..883a4fc 100644 --- a/nl-NL/step_1.md +++ b/nl-NL/step_1.md @@ -1,46 +1,46 @@ -- You can find and replace simple patterns of characters using Python's `re` module. +- Je kunt eenvoudige patronen van tekst vinden en vervangen met behulp van de `re` module van Python. -- A simple pattern would be a single character or a sequence of characters, such as 'A' or 'cat'. +- Een eenvoudig patroon zou een enkel karakter of een reeks karakters zijn, zoals 'A' of 'kat'. -- First, import the `re` module in your script: +- Importeer eerst de `re` module in je script: ```python import re ``` -- Then create a simple string with which to experiment. +- Maak vervolgens een eenvoudige string waarmee je kunt experimenteren. ```python import re -title = 'Harry Potter' +titel = 'Harry Potter' ``` -- Using `re.sub` you can change any character in the string. For instance, changing the `r` characters to `i` looks like this: +- Met behulp van `re.sub` kun je elk teken in de tekenreeks wijzigen. Als je bijvoorbeeld de `r` letters wijzigt in `i` dan ziet dit er als volgt uit: ```python -new_title = re.sub('r', 'i', title) -print(new_title) +nieuwe_titel = re.sub('r', 'i', titel) +print(nieuwe_titel) ``` -- This will give us `'Haiiy Pottei'`. +- Dit geeft ons `'Haiiy Pottei'`. -- You can also change sequences of characters: +- Je kunt ook reeksen tekens wijzigen: ```python -new_title = re.sub('rr', 'pp', title) +nieuwe_titel = re.sub('rr', 'pp', titel) ``` -- Printing `new_title` will now give you `'Happy Potter'`. +- Als je `nieuwe_titel` afdrukt, krijg je nu `'Happy Potter'`. -- Of course, you can also substitute whole words. +- Je kunt natuurlijk ook hele woorden vervangen. ```python -new_title = re.sub('Potter', 'Styles', title) +nieuwe_titel = re.sub('Potter', 'Styles', titel) ``` -- You can also stop the substitution after a set number of replacements. So to only replace the first match, you can do this: +- Je kunt de vervanging ook stoppen na een bepaald aantal vervangingen. Dus om alleen de eerste overeenkomst te vervangen, kun je dit doen: ```python -new_title = re.sub('r', 'i', title, 1) +nieuwe_titel = re.sub('r', 'i', titel, 1) ``` -- This will make the `new_title` variable contain `'Hairy Potter'`. +- Hierdoor bevat de variabele `nieuwe_titel ` `'Hairy Potter'`. From 0c78e884161c5c2855cfe5daba48371140a508b5 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:39 +0100 Subject: [PATCH 138/159] New translations .keep (French) --- fr-FR/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 fr-FR/solutions/.keep diff --git a/fr-FR/solutions/.keep b/fr-FR/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/fr-FR/solutions/.keep @@ -0,0 +1 @@ + From 9868acae533ada58d5e655fe444b196f08050943 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:40 +0100 Subject: [PATCH 139/159] New translations .keep (German) --- de-DE/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 de-DE/solutions/.keep diff --git a/de-DE/solutions/.keep b/de-DE/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/de-DE/solutions/.keep @@ -0,0 +1 @@ + From 07e0bf7229be94955b24ffc963cacc839db1deda Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:41 +0100 Subject: [PATCH 140/159] New translations .keep (Spanish) --- es-ES/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 es-ES/solutions/.keep diff --git a/es-ES/solutions/.keep b/es-ES/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/es-ES/solutions/.keep @@ -0,0 +1 @@ + From f3243c595d94bd01e93e9e5f7877cfa7d2af96d8 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:42 +0100 Subject: [PATCH 141/159] New translations .keep (Afrikaans) --- af-ZA/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 af-ZA/solutions/.keep diff --git a/af-ZA/solutions/.keep b/af-ZA/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/af-ZA/solutions/.keep @@ -0,0 +1 @@ + From 55acf6af19a2e95f493982e6f63a4e1e779c319c Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:43 +0100 Subject: [PATCH 142/159] New translations .keep (Arabic) --- ar-SA/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 ar-SA/solutions/.keep diff --git a/ar-SA/solutions/.keep b/ar-SA/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ar-SA/solutions/.keep @@ -0,0 +1 @@ + From 3b842c17c41ac15fc77667cc3f3d0c56dedd77bb Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:44 +0100 Subject: [PATCH 143/159] New translations .keep (Catalan) --- ca-ES/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 ca-ES/solutions/.keep diff --git a/ca-ES/solutions/.keep b/ca-ES/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ca-ES/solutions/.keep @@ -0,0 +1 @@ + From cdc21e0d10d3fd7430ee216e8d9f6ef7db3cf45c Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:45 +0100 Subject: [PATCH 144/159] New translations .keep (Czech) --- cs-CZ/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 cs-CZ/solutions/.keep diff --git a/cs-CZ/solutions/.keep b/cs-CZ/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/cs-CZ/solutions/.keep @@ -0,0 +1 @@ + From 1f0578d441c87d0d65497c6c466e7ae150ec6d9d Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:47 +0100 Subject: [PATCH 145/159] New translations .keep (Danish) --- da-DK/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 da-DK/solutions/.keep diff --git a/da-DK/solutions/.keep b/da-DK/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/da-DK/solutions/.keep @@ -0,0 +1 @@ + From 9f7cf272b492969e401b66a518c0af763f76a8e4 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:48 +0100 Subject: [PATCH 146/159] New translations .keep (Greek) --- el-GR/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 el-GR/solutions/.keep diff --git a/el-GR/solutions/.keep b/el-GR/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/el-GR/solutions/.keep @@ -0,0 +1 @@ + From 5a12d69c1a6fb363f96613a83102a833ad2b29f6 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:49 +0100 Subject: [PATCH 147/159] New translations meta.yml (Dutch) --- nl-NL/meta.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nl-NL/meta.yml b/nl-NL/meta.yml index f2e3d0a..6734594 100644 --- a/nl-NL/meta.yml +++ b/nl-NL/meta.yml @@ -1,7 +1,7 @@ --- -title: Substitute simple regex patterns with Python +title: Vervang eenvoudige regex-patronen met Python hero_image: images/banner.png -description: Replace character patterns with Python and regex +description: Vervang tekstpatronen met Python en regex original_url: theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow duration: 1 @@ -14,5 +14,5 @@ technologies: "regex, python" site_areas: steps: - - title: Replacing patterns + title: Patronen vervangen From 071e9bd7969a917ebd44dbbfdcaa68c91cc579af Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:50 +0100 Subject: [PATCH 148/159] New translations .keep (Finnish) --- fi-FI/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 fi-FI/solutions/.keep diff --git a/fi-FI/solutions/.keep b/fi-FI/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/fi-FI/solutions/.keep @@ -0,0 +1 @@ + From 13d3d4934e667f2496fd62246c7e1c09341b8f0a Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:51 +0100 Subject: [PATCH 149/159] New translations .keep (Hebrew) --- he-IL/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 he-IL/solutions/.keep diff --git a/he-IL/solutions/.keep b/he-IL/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/he-IL/solutions/.keep @@ -0,0 +1 @@ + From 314deab6c7eb060c4f1ea5792ad7c7559ed97144 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:52 +0100 Subject: [PATCH 150/159] New translations .keep (Hungarian) --- hu-HU/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 hu-HU/solutions/.keep diff --git a/hu-HU/solutions/.keep b/hu-HU/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/hu-HU/solutions/.keep @@ -0,0 +1 @@ + From 3e70b02acfe18ec1df621d834feca4b350201342 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:54 +0100 Subject: [PATCH 151/159] New translations .keep (Italian) --- it-IT/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 it-IT/solutions/.keep diff --git a/it-IT/solutions/.keep b/it-IT/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/it-IT/solutions/.keep @@ -0,0 +1 @@ + From ca018d9523d79ad83388b26e8c04f290e74dc29b Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:55 +0100 Subject: [PATCH 152/159] New translations .keep (Japanese) --- ja-JP/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 ja-JP/solutions/.keep diff --git a/ja-JP/solutions/.keep b/ja-JP/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ja-JP/solutions/.keep @@ -0,0 +1 @@ + From a222968b9dbf964a1e0f4e13cf312036cdf67de8 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:56 +0100 Subject: [PATCH 153/159] New translations .keep (Korean) --- ko-KR/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 ko-KR/solutions/.keep diff --git a/ko-KR/solutions/.keep b/ko-KR/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/ko-KR/solutions/.keep @@ -0,0 +1 @@ + From 2a5cfd31b0555acda0d4b8b665609189bd696883 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Sun, 26 Apr 2020 10:42:58 +0100 Subject: [PATCH 154/159] New translations .keep (Portuguese, Brazilian) --- pt-BR/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 pt-BR/solutions/.keep diff --git a/pt-BR/solutions/.keep b/pt-BR/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/pt-BR/solutions/.keep @@ -0,0 +1 @@ + From c44b5a6aae0288375b0329750f27228790422770 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Tue, 28 Jul 2020 12:36:24 +0100 Subject: [PATCH 155/159] New translations meta.yml (Spanish, Latin America) --- es-LA/meta.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 es-LA/meta.yml diff --git a/es-LA/meta.yml b/es-LA/meta.yml new file mode 100644 index 0000000..486d04d --- /dev/null +++ b/es-LA/meta.yml @@ -0,0 +1,18 @@ +--- +title: Sustituye patrones simples de expresiones regulares con Python +hero_image: images/banner.png +description: Reemplaza patrones de caracteres con Python y regex +original_url: +theme: red #possible values: blue, green, navy, orange, red, turquoise, violet, yellow +duration: 1 +listed: false +ingredient: true +copyedit: true +curriculum: +interests: +technologies: "regex, python" +site_areas: +steps: + - + title: Reemplazando patrones + From 8b7f1b6f7ae5d6a94553e8f078509e2e35098025 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Tue, 28 Jul 2020 12:36:26 +0100 Subject: [PATCH 156/159] New translations step_1.md (Spanish, Latin America) --- es-LA/step_1.md | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 es-LA/step_1.md diff --git a/es-LA/step_1.md b/es-LA/step_1.md new file mode 100644 index 0000000..e6572c6 --- /dev/null +++ b/es-LA/step_1.md @@ -0,0 +1,46 @@ +- Puedes encontrar y reemplazar patrones simples de caracteres usando el módulo `re` de Python. + +- Un patrón simple sería un único carácter o una secuencia de caracteres, tales como 'A' o 'gato'. + +- Primero, importa el módulo `re` en tu script: + +```python +import re +``` + +- Luego crea una cadena simple con la cual experimentar. + +```python +import re +titulo = 'Harry Potter' +``` + +- Usando `re.sub` puedes cambiar cualquier carácter de la cadena. Por ejemplo, cambiar los caracteres `r` a `i` se ve así: + +```python +nuevo_titulo = re.sub('r', 'i', titulo) +print(nuevo_titulo) +``` +- Esto nos dará `'Haiiy Pottei'`. + +- También puedes cambiar secuencias de caracteres: + +```python +nuevo_titulo = re.sub('rr', 'i', titulo) +``` + +- Imprimir `nuevo_titulo` ahora te dará `'Happy Potter'`. + +- Por supuesto, también puede sustituir palabras enteras. + +```python +nuevo_titulo = re.sub('Potter', 'Estilos', titulo) +``` + +- También puedes detener la sustitución después de un número determinado de reemplazos. Así que para reemplazar solo la primera coincidencia, puedes hacer esto: + +```python +nuevo_titulo = re.sub('r', 'i', titulo, 1) +``` + +- Esto hará que la variable `nuevo_titulo` contenga `'Hairy Potter'`. From 32962cdd0d47a5f1d2822ade24bf60fb1ba84c90 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Tue, 28 Jul 2020 12:36:27 +0100 Subject: [PATCH 157/159] New translations step_2.md (Spanish, Latin America) --- es-LA/step_2.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 es-LA/step_2.md diff --git a/es-LA/step_2.md b/es-LA/step_2.md new file mode 100644 index 0000000..50b1ff8 --- /dev/null +++ b/es-LA/step_2.md @@ -0,0 +1,13 @@ +## Qué necesitarás + +### Hardware + ++ Enumera el hardware aquí, o elimina la sección. + +### Software + ++ Enumera el software aquí, o elimina la sección. + +### Recursos adicionales + ++ Enumere recursos adicionales o elimine la sección. From acb4f9139e6f207d66999e2ceb11477ebf960707 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Tue, 28 Jul 2020 12:36:29 +0100 Subject: [PATCH 158/159] New translations step_3.md (Spanish, Latin America) --- es-LA/step_3.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 es-LA/step_3.md diff --git a/es-LA/step_3.md b/es-LA/step_3.md new file mode 100644 index 0000000..08a4a30 --- /dev/null +++ b/es-LA/step_3.md @@ -0,0 +1,3 @@ +## Título del paso + ++ Paso contenido... From e76d92f951be54994c6401384d0e8e5052bc4047 Mon Sep 17 00:00:00 2001 From: majamanojlovic <49232422+majamanojlovic@users.noreply.github.com> Date: Tue, 28 Jul 2020 12:37:21 +0100 Subject: [PATCH 159/159] New translations .keep (Spanish, Latin America) --- es-LA/solutions/.keep | 1 + 1 file changed, 1 insertion(+) create mode 100644 es-LA/solutions/.keep diff --git a/es-LA/solutions/.keep b/es-LA/solutions/.keep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/es-LA/solutions/.keep @@ -0,0 +1 @@ +