summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-06-15 07:32:52 +0200
committerGitHub <noreply@github.com>2020-06-15 07:32:52 +0200
commit6368d7b97d31a2f471dcfad0b8672573397beca9 (patch)
treef3c4bcec745837059c0cebaf33ce4353a777b63e
parentfe858b74b8fbd345f1d08807abcf2b6dbea035a9 (diff)
parente5d93f7a66ce93bc8d9db37736aa0e6050ff1172 (diff)
Merge pull request #39551 from mrushyendra/regex_class_doc
[Doc] Fix RegEx expression result
-rw-r--r--modules/regex/doc_classes/RegEx.xml3
-rw-r--r--modules/regex/doc_classes/RegExMatch.xml2
2 files changed, 2 insertions, 3 deletions
diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml
index 3130c53331..c00fa96b2e 100644
--- a/modules/regex/doc_classes/RegEx.xml
+++ b/modules/regex/doc_classes/RegEx.xml
@@ -32,8 +32,7 @@
[codeblock]
for result in regex.search_all("d01, d03, d0c, x3f and x42"):
print(result.get_string("digit"))
- # Would print 01 03 3f 42
- # Note that d0c would not match
+ # Would print 01 03 0 3f 42
[/codeblock]
[b]Note:[/b] Godot's regex implementation is based on the [url=https://www.pcre.org/]PCRE2[/url] library. You can view the full pattern reference [url=https://www.pcre.org/current/doc/html/pcre2pattern.html]here[/url].
[b]Tip:[/b] You can use [url=https://regexr.com/]Regexr[/url] to test regular expressions online.
diff --git a/modules/regex/doc_classes/RegExMatch.xml b/modules/regex/doc_classes/RegExMatch.xml
index 151e881b6f..a45de60aef 100644
--- a/modules/regex/doc_classes/RegExMatch.xml
+++ b/modules/regex/doc_classes/RegExMatch.xml
@@ -49,7 +49,7 @@
</methods>
<members>
<member name="names" type="Dictionary" setter="" getter="get_names" default="{}">
- A dictionary of named groups and its corresponding group number. Only groups with that were matched are included. If multiple groups have the same name, that name would refer to the first matching one.
+ A dictionary of named groups and its corresponding group number. Only groups that were matched are included. If multiple groups have the same name, that name would refer to the first matching one.
</member>
<member name="strings" type="Array" setter="" getter="get_strings" default="[ ]">
An [Array] of the match and its capturing groups.