mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Sync classref with current source
This commit is contained in:
@@ -51,7 +51,7 @@ To begin, the RegEx object needs to be compiled with the search pattern using :r
|
||||
var regex = RegEx.new()
|
||||
regex.compile("\\w-(\\d+)")
|
||||
|
||||
The search pattern must be escaped first for gdscript before it is escaped for the expression. For example, ``compile("\\d+")`` would be read by RegEx as ``\d+``. Similarly, ``compile("\"(?:\\\\.|[^\"])\*\"")`` would be read as ``"(?:\\.|[^"])\*"``
|
||||
The search pattern must be escaped first for gdscript before it is escaped for the expression. For example, ``compile("\\d+")`` would be read by RegEx as ``\d+``. Similarly, ``compile("\"(?:\\\\.|[^\"])*\"")`` would be read as ``"(?:\\.|[^"])*"``
|
||||
|
||||
Using :ref:`search<class_RegEx_search>` you can find the pattern within the given text. If a pattern is found, :ref:`RegExMatch<class_regexmatch>` is returned and you can retrieve details of the results using fuctions such as :ref:`RegExMatch.get_string<class_RegExMatch_get_string>` and :ref:`RegExMatch.get_start<class_RegExMatch_get_start>`.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user