You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: concepts/regular-expressions/introduction.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
3
3
Package [regexp][package-regexp] offers support for regular expressions in Go.
4
4
5
-
## Syntax
5
+
## Syntax
6
6
7
-
The [syntax][regexp-syntax] of the regular expressions accepted is the same general syntax used by Perl, Python, and other languages.
7
+
The [syntax][regexp-syntax] of the regular expressions accepted is the same general syntax used by Perl, Python, and other languages.
8
8
9
-
Both the search patterns and the input texts are interpreted as UTF-8.
9
+
Both the search patterns and the input texts are interpreted as UTF-8.
10
10
11
11
When using backticks (\`) to make strings, backslashes (`\`) don't have any special meaning and don't mark the beginning of special characters like tabs `\t` or newlines `\n`:
12
12
@@ -39,29 +39,29 @@ re, err = regexp.Compile(`a|b)+`)
s = re.ReplaceAllString("123 456", "X") // => "123 456"
125
125
```
126
-
126
+
127
127
### `Split` Examples
128
-
128
+
129
129
Method `re.Split(s,n)` slices a text `s` into substrings separated by the expression and returns a slice of the substrings between those expression matches.
130
130
The count `n` determines the maximal number of substrings to return.
Copy file name to clipboardExpand all lines: exercises/concept/parsing-log-files/.docs/introduction.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
3
3
Package [regexp][package-regexp] offers support for regular expressions in Go.
4
4
5
-
## Syntax
5
+
## Syntax
6
6
7
-
The [syntax][regexp-syntax] of the regular expressions accepted is the same general syntax used by Perl, Python, and other languages.
7
+
The [syntax][regexp-syntax] of the regular expressions accepted is the same general syntax used by Perl, Python, and other languages.
8
8
9
-
Both the search patterns and the input texts are interpreted as UTF-8.
9
+
Both the search patterns and the input texts are interpreted as UTF-8.
10
10
11
11
When using backticks (\`) to make strings, backslashes (`\`) don't have any special meaning and don't mark the beginning of special characters like tabs `\t` or newlines `\n`:
12
12
@@ -39,29 +39,29 @@ re, err = regexp.Compile(`a|b)+`)
s = re.ReplaceAllString("123 456", "X") // => "123 456"
125
125
```
126
-
126
+
127
127
### `Split` Examples
128
-
128
+
129
129
Method `re.Split(s,n)` slices a text `s` into substrings separated by the expression and returns a slice of the substrings between those expression matches.
130
130
The count `n` determines the maximal number of substrings to return.
0 commit comments