diff options
| author | luz.paz | 2018-02-21 11:30:55 -0500 |
|---|---|---|
| committer | Hein-Pieter van Braam | 2018-02-22 12:17:06 +0100 |
| commit | 751806b5c7c2b63c47d228664c3425b6f3fdb5ac (patch) | |
| tree | 2679c664c7a5ebbcf51c8727e0840c9b98926948 /modules/regex | |
| parent | 40018e995cc2a4c5a14512eb7713b63a5b825978 (diff) | |
| download | godot-751806b5c7c2b63c47d228664c3425b6f3fdb5ac.tar.gz godot-751806b5c7c2b63c47d228664c3425b6f3fdb5ac.tar.zst godot-751806b5c7c2b63c47d228664c3425b6f3fdb5ac.zip | |
Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
(cherry picked from commit 612ab4bbc6f2396f4dcd68c3f142f7dfa2f5f0a5)
Diffstat (limited to 'modules/regex')
| -rw-r--r-- | modules/regex/doc_classes/RegEx.xml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml index 2cf80acd2..920d0e97c 100644 --- a/modules/regex/doc_classes/RegEx.xml +++ b/modules/regex/doc_classes/RegEx.xml @@ -4,14 +4,14 @@ Class for searching text for patterns using regular expressions. </brief_description> <description> - Regular Expression (or regex) is a compact programming language that can be used to recognise strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For instance, a regex of [code]ab[0-9][/code] would find any string that is [code]ab[/code] followed by any number from [code]0[/code] to [code]9[/code]. For a more in-depth look, you can easily find various tutorials and detailed explainations on the Internet. + Regular Expression (or regex) is a compact programming language that can be used to recognise strings that follow a specific pattern, such as URLs, email addresses, complete sentences, etc. For instance, a regex of [code]ab[0-9][/code] would find any string that is [code]ab[/code] followed by any number from [code]0[/code] to [code]9[/code]. For a more in-depth look, you can easily find various tutorials and detailed explanations on the Internet. To begin, the RegEx object needs to be compiled with the search pattern using [method compile] before it can be used. [codeblock] var regex = RegEx.new() regex.compile("\\w-(\\d+)") [/codeblock] The search pattern must be escaped first for gdscript before it is escaped for the expression. For example, [code]compile("\\d+")[/code] would be read by RegEx as [code]\d+[/code]. Similarly, [code]compile("\"(?:\\\\.|[^\"])*\"")[/code] would be read as [code]"(?:\\.|[^"])*"[/code] - Using [method search] you can find the pattern within the given text. If a pattern is found, [RegExMatch] is returned and you can retrieve details of the results using fuctions such as [method RegExMatch.get_string] and [method RegExMatch.get_start]. + Using [method search] you can find the pattern within the given text. If a pattern is found, [RegExMatch] is returned and you can retrieve details of the results using functions such as [method RegExMatch.get_string] and [method RegExMatch.get_start]. [codeblock] var regex = RegEx.new() regex.compile("\\w-(\\d+)") |
