瀏覽代碼

Change reserved keyword in Regex documentation code

(cherry picked from commit 446a3f8ff23ca26aa4bb5d2ed7bfc49f2941777d)
Vedat Günel 4 年之前
父節點
當前提交
de34616552
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      modules/regex/doc_classes/RegEx.xml

+ 2 - 2
modules/regex/doc_classes/RegEx.xml

@@ -39,8 +39,8 @@
 		var regex = RegEx.new()
 		var regex = RegEx.new()
 		regex.compile("\\S+") # Negated whitespace character class.
 		regex.compile("\\S+") # Negated whitespace character class.
 		var results = []
 		var results = []
-		for match in regex.search_all("One  Two \n\tThree"):
-		    results.push_back(match.get_string())
+		for result in regex.search_all("One  Two \n\tThree"):
+		    results.push_back(result.get_string())
 		# The `results` array now contains "One", "Two", "Three".
 		# The `results` array now contains "One", "Two", "Three".
 		[/codeblock]
 		[/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]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].