From 7adf4cc9b5de6701a41e27690a69b9892d5eed85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Fri, 30 Jul 2021 15:28:05 +0200 Subject: doc: Use self-closing tags for `return` and `argument` For the time being we don't support writing a description for those, preferring having all details in the method's description. Using self-closing tags saves half the lines, and prevents contributors from thinking that they should write the argument or return documentation there. --- modules/regex/doc_classes/RegEx.xml | 63 +++++++++++--------------------- modules/regex/doc_classes/RegExMatch.xml | 21 ++++------- 2 files changed, 28 insertions(+), 56 deletions(-) (limited to 'modules/regex') diff --git a/modules/regex/doc_classes/RegEx.xml b/modules/regex/doc_classes/RegEx.xml index 7f5a0dfecb..9c84974ff6 100644 --- a/modules/regex/doc_classes/RegEx.xml +++ b/modules/regex/doc_classes/RegEx.xml @@ -50,88 +50,67 @@ - - + This method resets the state of the object, as if it was freshly created. Namely, it unassigns the regular expression of this object. - - - - + + Compiles and assign the search pattern to use. Returns [constant OK] if the compilation is successful. If an error is encountered, details are printed to standard output and an error is returned. - - + Returns the number of capturing groups in compiled pattern. - - + Returns an array of names of named capturing groups in the compiled pattern. They are ordered by appearance. - - + Returns the original search pattern that was compiled. - - + Returns whether this object has a valid search pattern assigned. - - - - - - - - + + + + Searches the text for the compiled pattern. Returns a [RegExMatch] container of the first matching result if found, otherwise [code]null[/code]. The region to search within can be specified without modifying where the start and end anchor would be. - - - - - - - - + + + + Searches the text for the compiled pattern. Returns an array of [RegExMatch] containers for each non-overlapping result. If no results were found, an empty array is returned instead. The region to search within can be specified without modifying where the start and end anchor would be. - - - - - - - - - - - - + + + + + + Searches the text for the compiled pattern and replaces it with the specified string. Escapes and backreferences such as [code]$1[/code] and [code]$name[/code] are expanded and resolved. By default, only the first instance is replaced, but it can be changed for all instances (global replacement). The region to search within can be specified without modifying where the start and end anchor would be. diff --git a/modules/regex/doc_classes/RegExMatch.xml b/modules/regex/doc_classes/RegExMatch.xml index 492519d3d9..3cde2836cc 100644 --- a/modules/regex/doc_classes/RegExMatch.xml +++ b/modules/regex/doc_classes/RegExMatch.xml @@ -10,37 +10,30 @@ - - - - + + Returns the end position of the match within the source string. The end position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. Returns -1 if the group did not match or doesn't exist. - - + Returns the number of capturing groups. - - - - + + Returns the starting position of the match within the source string. The starting position of capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. Returns -1 if the group did not match or doesn't exist. - - - - + + Returns the substring of the match from the source string. Capturing groups can be retrieved by providing its group number as an integer or its string name (if it's a named group). The default value of 0 refers to the whole pattern. Returns an empty string if the group did not match or doesn't exist. -- cgit v1.2.3