Skip to content

Commit 66eedd7

Browse files
committed
Remove concepts of removed stdlib modules
1 parent 5b95469 commit 66eedd7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+412
-836
lines changed

concepts/iterators/.meta/config.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

concepts/iterators/about.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

concepts/iterators/introduction.md

Lines changed: 0 additions & 39 deletions
This file was deleted.

concepts/iterators/links.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

concepts/queues/.meta/config.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

concepts/queues/about.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

concepts/queues/introduction.md

Lines changed: 0 additions & 65 deletions
This file was deleted.

concepts/queues/links.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

concepts/regular-expressions/.meta/config.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

concepts/regular-expressions/about.md

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,41 @@
22

33
Regular expressions in Gleam follow the **PCRE** specification (**P**erl **C**ompatible **R**egular **E**xpressions), similarly to other popular languages like Java, JavaScript, or Ruby.
44

5-
The `gleam/regex` module offers functions for working with regular expressions.
5+
The `gleam/regexp` module offers functions for working with regular expressions.
66

7-
~~~~exercism/note
7+
```exercism/note
88
This exercise assumes that you already know regular expression syntax, including character classes, quantifiers, groups, and captures.
99
10-
if you need to refresh your regular expression knowledge, check out one of those sources: [Regular-Expressions.info](https://www.regular-expressions.info), [Rex Egg](https://www.rexegg.com/), [RegexOne](https://regexone.com/), [Regular Expressions 101](https://regex101.com/), [RegExr](https://regexr.com/).
11-
~~~~
10+
if you need to refresh your regular expression knowledge, check out one of those sources: [Regular-Expressions.info](https://www.regular-expressions.info), [Rex Egg](https://www.rexegg.com/), [regexOne](https://regexone.com/), [Regular Expressions 101](https://regex101.com/), [regexr](https://regexr.com/).
11+
```
1212

13-
The most common way to create regular expressions is using the `regex.from_string` function.
13+
The most common way to create regular expressions is using the `regexp.from_string` function.
1414

1515
```gleam
16-
let assert Ok(re) = regex.from_string("test")
16+
let assert Ok(re) = regexp.from_string("test")
1717
```
1818

19-
The `regex.from_string` function yields an `Error` if the regular expression syntax is invalid, so a let-assertion has been used here to ensure the regular expression is valid.
19+
The `regexp.from_string` function yields an `Error` if the regular expression syntax is invalid, so a let-assertion has been used here to ensure the regular expression is valid.
2020

21-
The `regex.check` function can be used to check if a regular expression matches a string.
21+
The `regexp.check` function can be used to check if a regular expression matches a string.
2222

2323
```gleam
24-
let assert Ok(re) = regex.from_string("test")
24+
let assert Ok(re) = regexp.from_string("test")
2525
26-
regex.check(re, "this is a test")
26+
regexp.check(re, "this is a test")
2727
// -> True
2828
29-
regex.check(re, "this is too")
29+
regexp.check(re, "this is too")
3030
// -> False
3131
```
3232

33-
3433
## Captures
3534

36-
If you wish to capture substrings using a regular expression, the `regex.scan` function can be used to return a list of matches.
35+
If you wish to capture substrings using a regular expression, the `regexp.scan` function can be used to return a list of matches.
3736

3837
```gleam
39-
let assert Ok(re) = regex.from_string("[oi]n a (\\w+)")
40-
regex.scan(with: re, content: "I am on a boat in a lake.")
38+
let assert Ok(re) = regexp.from_string("[oi]n a (\\w+)")
39+
regexp.scan(with: re, content: "I am on a boat in a lake.")
4140
// -> [
4241
// Match(
4342
// content: "on a boat",
@@ -52,11 +51,11 @@ regex.scan(with: re, content: "I am on a boat in a lake.")
5251

5352
## Modifiers
5453

55-
The behaviour of a regular expression can be modified by creating it with the `regex.compile` function and passing in options.
54+
The behaviour of a regular expression can be modified by creating it with the `regexp.compile` function and passing in options.
5655

5756
```gleam
58-
let options = regex.Options(case_insensitive: True, multi_line: False)
59-
let assert Ok(re) = regex.compile("[A-Z]", with: options)
60-
regex.check(re, "abc123")
57+
let options = regexp.Options(case_insensitive: True, multi_line: False)
58+
let assert Ok(re) = regexp.compile("[A-Z]", with: options)
59+
regexp.check(re, "abc123")
6160
// -> True
6261
```

0 commit comments

Comments
 (0)