From 2eba585d38d29b9ee31f8132fca912d0f26d8154 Mon Sep 17 00:00:00 2001 From: Zher Huei Lee Date: Sat, 11 Nov 2017 08:07:50 +0800 Subject: Added RegEx.search_all() for multiple matches And updated the docs --- doc/classes/RegExMatch.xml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'doc/classes/RegExMatch.xml') diff --git a/doc/classes/RegExMatch.xml b/doc/classes/RegExMatch.xml index abf2e383d5..1ace7a770a 100644 --- a/doc/classes/RegExMatch.xml +++ b/doc/classes/RegExMatch.xml @@ -4,7 +4,7 @@ Contains the results of a regex search. - Contains the results of a regex search. [method RegEx.search] returns an instance of [code]RegExMatch[/code] if it finds the search pattern in the [source] string. + Contains the results of a single regex match returned by [method RegEx.search] and [method.RegEx.search_all]. It can be used to find the position and range of the match and its capturing groups, and it can extract its sub-string for you. @@ -17,21 +17,22 @@ - Returns the end position of the match in the [source] string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). + 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 numeric capturing groups. + Returns the number of capturing groups. - Returns an array of names of named capturing groups. + Returns 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. @@ -40,7 +41,8 @@ - Returns the starting position of the match in the [source] string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). + 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. @@ -49,21 +51,22 @@ - Returns the result of the match in the [source] string. An integer can be specified for numeric groups or a string for named groups. Returns -1 if that group wasn't found or doesn't exist. Defaults to 0 (whole pattern). + 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. - Returns an [Array] of the matches in the [source] string. + Returns an [Array] of the match and its capturing groups. - Returns the [source] string used with the search pattern to find this matching result. + Returns the source string used with the search pattern to find this matching result. -- cgit v1.2.3