yiguolei commented on code in PR #2568:
URL: https://github.com/apache/doris-website/pull/2568#discussion_r2184299159


##########
docs/sql-manual/sql-functions/scalar-functions/string-functions/regexp-extract-or-null.md:
##########
@@ -38,20 +41,22 @@ REGEXP_EXTRACT_OR_NULL(<str>, <pattern>, <pos>)
 
 | Parameter | Description |
 | -- | -- |
-| `<str>` | String, a text string that needs to be matched with regular 
expressions. |
-| `<pattern>` | String, target pattern. |
-| `<pos>` | Integer, the index of the expression group to extract, counting 
starts from 1. |
+| `<str>` | A string parameter. It represents the text string in which the 
regular expression matching will be performed. This string can contain any 
combination of characters, and the function will search within it for 
substrings that match the <pattern>. |
+| `<pattern>` |A string parameter. It is the target regular expression 
pattern. This pattern can include various regular expression metacharacters and 
character classes, which precisely define the rules for the substring to be 
matched |
+| `<pos>` | An integer parameter. It indicates the index of the expression 
group to be extracted. The indexing starts from 1. If <pos> is set to 0, the 
entire first matching substring will be returned. If <pos> is a negative number 
or exceeds the number of expression groups in the pattern, the function will 
return NULL. |
 
 ## Return Value
 
 Return a string type, with the result being the part that matches `<pattern>`.
 
-- If the input `<pos>` is 0, return the entire first matching substring.
-- If the input `<pos>` is invalid (negative or exceeds the number of 
expression groups), return NULL.
-- If the regular expression fails to match, return NULL.
+ If the input `<pos>` is 0, return the entire first matching substring.

Review Comment:
   如果str 和pattern 为null 怎么办?



##########
docs/sql-manual/sql-functions/scalar-functions/string-functions/regexp-extract-or-null.md:
##########
@@ -100,6 +110,8 @@ SELECT REGEXP_EXTRACT_OR_NULL('AbCdE', 
'([[:lower:]]+)C([[:upper:]]+)', 1);
 +---------------------------------------------------------------------+
 ```
 
+Chinese character matching.The pattern (\p{Han}+)(.+) first matches one or 
more Chinese characters and then any remaining characters. The group with index 
2 represents the non - Chinese part of the string after the Chinese characters.

Review Comment:
   补充position 超过字符串长度的case;
   补充position 是负数的case
   补充str 或者 pattern 是null的case



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to