From 87f999274b98d43858a183dd8d174c7492337f27 Mon Sep 17 00:00:00 2001 From: Maganty Rushyendra Date: Mon, 15 Jun 2020 10:23:55 +0800 Subject: [PATCH] Fix RegEx example in class doc and correct typo Fix minor errors to do with `search_all` example in RegEx and typo in RegExMatch class docs. (cherry picked from commit e5d93f7a66ce93bc8d9db37736aa0e6050ff1172) --- modules/regex/doc_classes/RegEx.xml | 3 +-- modules/regex/doc_classes/RegExMatch.xml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml index 6e9a2efb0b3..9cffbb233c9 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 7ea5047dc19..637d9b00864 100644 --- a/modules/regex/doc_classes/RegExMatch.xml +++ b/modules/regex/doc_classes/RegExMatch.xml @@ -49,7 +49,7 @@ - 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. An [Array] of the match and its capturing groups.