This is an automated email from the ASF dual-hosted git repository.

yangzhg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 15c5896  [Docs] Add like, regexp function documents (#6182)
15c5896 is described below

commit 15c5896f4110c1c2ac35bdc847b19895b7347f5f
Author: EmmyMiao87 <522274...@qq.com>
AuthorDate: Thu Jul 15 13:16:21 2021 +0800

    [Docs] Add like, regexp function documents (#6182)
    
    * [Docs] Add like, regexp function documents
    
    * Reconstruct
    
    * Fix compile error
---
 docs/.vuepress/sidebar/en.js                       | 20 ++++++-
 docs/.vuepress/sidebar/zh-CN.js                    | 20 ++++++-
 .../append_trailing_char_if_absent.md              |  4 +-
 .../{regexp_replace.md => like/like.md}            | 51 ++++++++++------
 .../string-functions/like/not_like.md              | 68 ++++++++++++++++++++++
 .../string-functions/regexp/not_regexp.md          | 56 ++++++++++++++++++
 .../{regexp_replace.md => regexp/regexp.md}        | 42 ++++++-------
 .../{ => regexp}/regexp_extract.md                 |  0
 .../{ => regexp}/regexp_replace.md                 |  0
 .../append_trailing_char_if_absent.md              |  4 +-
 .../{regexp_replace.md => like/like.md}            | 51 ++++++++++------
 .../string-functions/like/not_like.md              | 68 ++++++++++++++++++++++
 .../{regexp_replace.md => regexp/not_regexp.md}    | 42 ++++++-------
 .../{regexp_replace.md => regexp/regexp.md}        | 42 ++++++-------
 .../{ => regexp}/regexp_extract.md                 |  3 -
 .../{ => regexp}/regexp_replace.md                 |  0
 16 files changed, 362 insertions(+), 109 deletions(-)

diff --git a/docs/.vuepress/sidebar/en.js b/docs/.vuepress/sidebar/en.js
index bf40bd3..ce584d0 100644
--- a/docs/.vuepress/sidebar/en.js
+++ b/docs/.vuepress/sidebar/en.js
@@ -314,8 +314,6 @@ module.exports = [
               "ltrim",
               "money_format",
               "null_or_empty",
-              "regexp_extract",
-              "regexp_replace",
               "repeat",
               "reverse",
               "right",
@@ -324,6 +322,24 @@ module.exports = [
               "starts_with",
               "strleft",
               "strright",
+              {
+                title: "fuzzy match",
+                directoryPath: "like/",
+                children: [
+                  "like",
+                  "not_like",
+                ],
+              },
+              {
+                title: "regular match",
+                directoryPath: "regexp/",
+                children: [
+                  "regexp",
+                  "regexp_extract",
+                  "regexp_replace",
+                  "not_regexp",
+                ],
+              },
             ],
           },
           {
diff --git a/docs/.vuepress/sidebar/zh-CN.js b/docs/.vuepress/sidebar/zh-CN.js
index e9ef97b..1e7acc6 100644
--- a/docs/.vuepress/sidebar/zh-CN.js
+++ b/docs/.vuepress/sidebar/zh-CN.js
@@ -319,8 +319,6 @@ module.exports = [
               "ltrim",
               "money_format",
               "null_or_empty",
-              "regexp_extract",
-              "regexp_replace",
               "repeat",
               "reverse",
               "right",
@@ -329,6 +327,24 @@ module.exports = [
               "starts_with",
               "strleft",
               "strright",
+              {
+                title: "模糊匹配",
+                directoryPath: "like/",
+                children: [
+                  "like",
+                  "not_like",
+                ],
+              },
+              {
+                title: "正则匹配",
+                directoryPath: "regexp/",
+                children: [
+                  "regexp",
+                  "regexp_extract",
+                  "regexp_replace",
+                  "not_regexp",
+                ],
+              },
             ],
           },
           {
diff --git 
a/docs/en/sql-reference/sql-functions/string-functions/append_trailing_char_if_absent.md
 
b/docs/en/sql-reference/sql-functions/string-functions/append_trailing_char_if_absent.md
index cd24883..6895c3e 100644
--- 
a/docs/en/sql-reference/sql-functions/string-functions/append_trailing_char_if_absent.md
+++ 
b/docs/en/sql-reference/sql-functions/string-functions/append_trailing_char_if_absent.md
@@ -32,8 +32,8 @@ under the License.
 
 `VARCHAR append_trailing_char_if_absent(VARCHAR str, VARCHAR trailing_char)`
 
-If the s string is non-empty and does not contain the c character at the end, 
it appends the c character to the end.
-Trailing_char contains only one character, and it will return NULL if contains 
more than one character
+If the @str string is non-empty and does not contain the @trailing_char 
character at the end, it appends the @trailing_char character to the end.
+@trailing_char contains only one character, and it will return NULL if 
contains more than one character
 
 ## example
 
diff --git 
a/docs/en/sql-reference/sql-functions/string-functions/regexp_replace.md 
b/docs/en/sql-reference/sql-functions/string-functions/like/like.md
similarity index 50%
copy from docs/en/sql-reference/sql-functions/string-functions/regexp_replace.md
copy to docs/en/sql-reference/sql-functions/string-functions/like/like.md
index 1eeff8f..6fcbdf4 100644
--- a/docs/en/sql-reference/sql-functions/string-functions/regexp_replace.md
+++ b/docs/en/sql-reference/sql-functions/string-functions/like/like.md
@@ -1,6 +1,6 @@
 ---
 {
-    "title": "regexp_replace",
+    "title": "like",
     "language": "en"
 }
 ---
@@ -24,31 +24,44 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-# regexp_replace
+# like
 ## description
-### Syntax
+### syntax
 
-`VARCHAR regexp_replace(VARCHAR str, VARCHAR pattern, VARCHAR repl)
+'BOOLEAN like(VARCHAR str, VARCHAR pattern)'
 
+Perform fuzzy matching on the string str, return true if it matches, and false 
if it doesn't match.
 
-Regular matching of STR strings, replacing the part hitting pattern with repl
+like match/fuzzy match, will be used in combination with % and _.
+
+'a'   // Precise matching, the same effect as `=`.
+'%a'  // data ending with a
+'a%'  // data starting with a
+'%a%' // data containing a
+'_a_' // Three digits and the middle letter is a
+'_a'  // Two digits and the ending letter is a
+'a_'  // Two digits and the initial letter is a
 
 ## example
 
 ```
-mysql> SELECT regexp_replace('a b c', " ", "-");
-+-----------------------------------+
-| regexp_replace('a b c', ' ', '-') |
-+-----------------------------------+
-| a-b-c                             |
-+-----------------------------------+
-
-mysql> SELECT regexp_replace('a b c','(b)','<\\1>');
-+----------------------------------------+
-| regexp_replace('a b c', '(b)', '<\1>') |
-+----------------------------------------+
-| a <b> c                                |
-+----------------------------------------+
+// Return the data containing a in the k1 string
+mysql> select k1 from test where k1 like '%a%';
++-------+
+| k1    |
++-------+
+| a     |
+| bab   |
++-------+
+
+// Return the data equal to a in the k1 string
+mysql> select k1 from test where k1 like 'a';
++-------+
+| k1    |
++-------+
+| a     |
++-------+
 ```
+
 ## keyword
-REGEXP_REPLACE,REGEXP,REPLACE
+LIKE
diff --git 
a/docs/en/sql-reference/sql-functions/string-functions/like/not_like.md 
b/docs/en/sql-reference/sql-functions/string-functions/like/not_like.md
new file mode 100644
index 0000000..3bfeaf0
--- /dev/null
+++ b/docs/en/sql-reference/sql-functions/string-functions/like/not_like.md
@@ -0,0 +1,68 @@
+---
+{
+    "title": "not like",
+    "language": "en"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# not like
+## description
+### syntax
+
+'BOOLEAN not like(VARCHAR str, VARCHAR pattern)'
+
+Perform fuzzy matching on the string str, return false if it matches, and 
return true if it doesn't match.
+
+like match/fuzzy match, will be used in combination with % and _.
+
+'a'   // Precise matching, the same effect as `=`.
+'%a'  // data ending with a
+'a%'  // data starting with a
+'%a%' // data containing a
+'_a_' // Three digits and the middle letter is a
+'_a'  // Two digits and the ending letter is a
+'a_'  // Two digits and the initial letter is a
+
+## example
+
+```
+// Return data that does not contain a in the k1 string
+mysql> select k1 from test where k1 not like '%a%';
++-------+
+| k1    |
++-------+
+| b     |
+| bb    |
++-------+
+
+// Return the data that is not equal to a in the k1 string
+mysql> select k1 from test where k1 not like 'a';
++-------+
+| k1    |
++-------+
+| bab   |
+| b     |
++-------+
+```
+
+## keyword
+LIKE, NOT, NOT LIKE
diff --git 
a/docs/en/sql-reference/sql-functions/string-functions/regexp/not_regexp.md 
b/docs/en/sql-reference/sql-functions/string-functions/regexp/not_regexp.md
new file mode 100644
index 0000000..7c5b94d
--- /dev/null
+++ b/docs/en/sql-reference/sql-functions/string-functions/regexp/not_regexp.md
@@ -0,0 +1,56 @@
+---
+{
+    "title": "not regexp",
+    "language": "en"
+}
+---
+
+<!-- 
+licensed to the apache software foundation (asf) under one
+or more contributor license agreements.  see the notice file
+distributed with this work for additional information
+regarding copyright ownership.  the asf licenses this file
+to you under the apache license, version 2.0 (the
+"license"); you may not use this file except in compliance
+with the license.  you may obtain a copy of the license at
+
+  http://www.apache.org/licenses/license-2.0
+
+unless required by applicable law or agreed to in writing,
+software distributed under the license is distributed on an
+"as is" basis, without warranties or conditions of any
+kind, either express or implied.  see the license for the
+specific language governing permissions and limitations
+under the license.
+-->
+
+# not regexp
+## description
+### syntax
+
+'BOOLEAN not regexp(VARCHAR str, VARCHAR pattern)'
+
+Perform regular matching on the string str, return false if it matches, and 
return true if it doesn't match. pattern is a regular expression.
+
+## example
+
+```
+// Find all data in the k1 field that does not start with 'billie'
+mysql> select k1 from test where k1 not regexp '^billie';
++--------------------+
+| k1                 |
++--------------------+
+| Emmy eillish       |
++--------------------+
+
+// Find all the data in the k1 field that does not end with 'ok':
+mysql> select k1 from test where k1 not regexp 'ok$';
++------------+
+| k1         |
++------------+
+| It's true  |
++------------+
+```
+
+## keyword
+REGEXP, NOT, NOT REGEXP
diff --git 
a/docs/en/sql-reference/sql-functions/string-functions/regexp_replace.md 
b/docs/en/sql-reference/sql-functions/string-functions/regexp/regexp.md
similarity index 53%
copy from docs/en/sql-reference/sql-functions/string-functions/regexp_replace.md
copy to docs/en/sql-reference/sql-functions/string-functions/regexp/regexp.md
index 1eeff8f..221cf7e 100644
--- a/docs/en/sql-reference/sql-functions/string-functions/regexp_replace.md
+++ b/docs/en/sql-reference/sql-functions/string-functions/regexp/regexp.md
@@ -1,6 +1,6 @@
 ---
 {
-    "title": "regexp_replace",
+    "title": "regexp",
     "language": "en"
 }
 ---
@@ -24,31 +24,33 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-# regexp_replace
+# regexp
 ## description
-### Syntax
+### syntax
 
-`VARCHAR regexp_replace(VARCHAR str, VARCHAR pattern, VARCHAR repl)
+'BOOLEAN regexp(VARCHAR str, VARCHAR pattern)'
 
-
-Regular matching of STR strings, replacing the part hitting pattern with repl
+Perform regular matching on the string str, return true if it matches, and 
return false if it doesn't match. pattern is a regular expression.
 
 ## example
 
 ```
-mysql> SELECT regexp_replace('a b c', " ", "-");
-+-----------------------------------+
-| regexp_replace('a b c', ' ', '-') |
-+-----------------------------------+
-| a-b-c                             |
-+-----------------------------------+
-
-mysql> SELECT regexp_replace('a b c','(b)','<\\1>');
-+----------------------------------------+
-| regexp_replace('a b c', '(b)', '<\1>') |
-+----------------------------------------+
-| a <b> c                                |
-+----------------------------------------+
+// Find all data starting with 'billie' in the k1 field
+mysql> select k1 from test where k1 regexp '^billie';
++--------------------+
+| k1                 |
++--------------------+
+| billie eillish     |
++--------------------+
+
+// Find all data ending with 'ok' in the k1 field:
+mysql> select k1 from test where k1 regexp 'ok$';
++----------+
+| k1       |
++----------+
+| It's ok  |
++----------+
 ```
+
 ## keyword
-REGEXP_REPLACE,REGEXP,REPLACE
+REGEXP
diff --git 
a/docs/en/sql-reference/sql-functions/string-functions/regexp_extract.md 
b/docs/en/sql-reference/sql-functions/string-functions/regexp/regexp_extract.md
similarity index 100%
rename from 
docs/en/sql-reference/sql-functions/string-functions/regexp_extract.md
rename to 
docs/en/sql-reference/sql-functions/string-functions/regexp/regexp_extract.md
diff --git 
a/docs/en/sql-reference/sql-functions/string-functions/regexp_replace.md 
b/docs/en/sql-reference/sql-functions/string-functions/regexp/regexp_replace.md
similarity index 100%
rename from 
docs/en/sql-reference/sql-functions/string-functions/regexp_replace.md
rename to 
docs/en/sql-reference/sql-functions/string-functions/regexp/regexp_replace.md
diff --git 
a/docs/zh-CN/sql-reference/sql-functions/string-functions/append_trailing_char_if_absent.md
 
b/docs/zh-CN/sql-reference/sql-functions/string-functions/append_trailing_char_if_absent.md
index b6770ef..3250d00 100644
--- 
a/docs/zh-CN/sql-reference/sql-functions/string-functions/append_trailing_char_if_absent.md
+++ 
b/docs/zh-CN/sql-reference/sql-functions/string-functions/append_trailing_char_if_absent.md
@@ -32,8 +32,8 @@ under the License.
 
 `VARCHAR append_trailing_char_if_absent(VARCHAR str, VARCHAR trailing_char)`
 
-如果's'字符串非空并且末尾不包含'c'字符,则将'c'字符附加到末尾。
-trailing_char只包含一个字符,如果包含多个字符,将返回NULL
+如果 str 字符串非空并且末尾不包含 trailing_char 字符,则将 trailing_char 字符附加到末尾。
+trailing_char 只能包含一个字符,如果包含多个字符,将返回NULL
 
 ## example
 
diff --git 
a/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_replace.md 
b/docs/zh-CN/sql-reference/sql-functions/string-functions/like/like.md
similarity index 51%
copy from 
docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_replace.md
copy to docs/zh-CN/sql-reference/sql-functions/string-functions/like/like.md
index bde41f7..34a58d1 100644
--- a/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_replace.md
+++ b/docs/zh-CN/sql-reference/sql-functions/string-functions/like/like.md
@@ -1,6 +1,6 @@
 ---
 {
-    "title": "regexp_replace",
+    "title": "like",
     "language": "zh-CN"
 }
 ---
@@ -24,31 +24,44 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-# regexp_replace
+# like
 ## description
-### Syntax
+### syntax
 
-`VARCHAR regexp_replace(VARCHAR str, VARCHAR pattern, VARCHAR repl)
+'BOOLEAN like(VARCHAR str, VARCHAR pattern)'
 
+对字符串 str 进行模糊匹配,匹配上的则返回 true,没匹配上则返回 false。
 
-对字符串 str 进行正则匹配, 将命中 pattern 的部分使用 repl 来进行替换
+like 匹配/模糊匹配,会与 % 和 _ 结合使用。
+
+'a'      // 精准匹配,和 `=` 效果一致。
+'%a'     // 以a结尾的数据
+'a%'     // 以a开头的数据
+'%a%'    // 含有a的数据
+'_a_'    // 三位且中间字母是 a 的
+'_a'     // 两位且结尾字母是 a 的
+'a_'     // 两位且开头字母是 a 的
 
 ## example
 
 ```
-mysql> SELECT regexp_replace('a b c', " ", "-");
-+-----------------------------------+
-| regexp_replace('a b c', ' ', '-') |
-+-----------------------------------+
-| a-b-c                             |
-+-----------------------------------+
-
-mysql> SELECT regexp_replace('a b c','(b)','<\\1>');
-+----------------------------------------+
-| regexp_replace('a b c', '(b)', '<\1>') |
-+----------------------------------------+
-| a <b> c                                |
-+----------------------------------------+
+// 返回 k1 字符串中包含 a 的数据
+mysql > select k1 from test where k1 like '%a%';
++-------+
+| k1    |
++-------+
+| a     |
+| bab   |
++-------+
+
+// 返回 k1 字符串中等于 a 的数据
+mysql > select k1 from test where k1 like 'a';
++-------+
+| k1    |
++-------+
+| a     |
++-------+
 ```
+
 ## keyword
-REGEXP_REPLACE,REGEXP,REPLACE
+LIKE
diff --git 
a/docs/zh-CN/sql-reference/sql-functions/string-functions/like/not_like.md 
b/docs/zh-CN/sql-reference/sql-functions/string-functions/like/not_like.md
new file mode 100644
index 0000000..9960f32
--- /dev/null
+++ b/docs/zh-CN/sql-reference/sql-functions/string-functions/like/not_like.md
@@ -0,0 +1,68 @@
+---
+{
+    "title": "not like",
+    "language": "zh-CN"
+}
+---
+
+<!-- 
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+# not like
+## description
+### syntax
+
+'BOOLEAN not like(VARCHAR str, VARCHAR pattern)'
+
+对字符串 str 进行模糊匹配,匹配上的则返回 false,没匹配上则返回 true。
+
+like 匹配/模糊匹配,会与 % 和 _ 结合使用。
+
+'a'      // 精准匹配,和 `=` 效果一致。
+'%a'     // 以a结尾的数据
+'a%'     // 以a开头的数据
+'%a%'    // 含有a的数据
+'_a_'    // 三位且中间字母是 a 的
+'_a'     // 两位且结尾字母是 a 的
+'a_'     // 两位且开头字母是 a 的
+
+## example
+
+```
+// 返回 k1 字符串中不包含 a 的数据
+mysql > select k1 from test where k1 not like '%a%';
++-------+
+| k1    |
++-------+
+| b     |
+| bb    |
++-------+
+
+// 返回 k1 字符串中不等于 a 的数据
+mysql > select k1 from test where k1 not like 'a';
++-------+
+| k1    |
++-------+
+| bab   |
+| b     |
++-------+
+```
+
+## keyword
+LIKE, NOT, NOT LIKE
diff --git 
a/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_replace.md 
b/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp/not_regexp.md
similarity index 53%
copy from 
docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_replace.md
copy to 
docs/zh-CN/sql-reference/sql-functions/string-functions/regexp/not_regexp.md
index bde41f7..4d28e82 100644
--- a/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_replace.md
+++ 
b/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp/not_regexp.md
@@ -1,6 +1,6 @@
 ---
 {
-    "title": "regexp_replace",
+    "title": "not regexp",
     "language": "zh-CN"
 }
 ---
@@ -24,31 +24,33 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-# regexp_replace
+# not regexp
 ## description
-### Syntax
+### syntax
 
-`VARCHAR regexp_replace(VARCHAR str, VARCHAR pattern, VARCHAR repl)
+'BOOLEAN not regexp(VARCHAR str, VARCHAR pattern)'
 
-
-对字符串 str 进行正则匹配, 将命中 pattern 的部分使用 repl 来进行替换
+对字符串 str 进行正则匹配,匹配上的则返回 false,没匹配上则返回 true。pattern 为正则表达式。
 
 ## example
 
 ```
-mysql> SELECT regexp_replace('a b c', " ", "-");
-+-----------------------------------+
-| regexp_replace('a b c', ' ', '-') |
-+-----------------------------------+
-| a-b-c                             |
-+-----------------------------------+
-
-mysql> SELECT regexp_replace('a b c','(b)','<\\1>');
-+----------------------------------------+
-| regexp_replace('a b c', '(b)', '<\1>') |
-+----------------------------------------+
-| a <b> c                                |
-+----------------------------------------+
+// 查找 k1 字段中不以 'billie' 为开头的所有数据
+mysql > select k1 from test where k1 not regexp '^billie';
++--------------------+
+| k1                 |
++--------------------+
+| Emmy eillish       |
++--------------------+
+
+// 查找 k1 字段中不以 'ok' 为结尾的所有数据:
+mysql > select k1 from test where k1 not regexp 'ok$';
++------------+
+| k1         |
++------------+
+| It's true  |
++------------+
 ```
+
 ## keyword
-REGEXP_REPLACE,REGEXP,REPLACE
+REGEXP, NOT, NOT REGEXP
diff --git 
a/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_replace.md 
b/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp/regexp.md
similarity index 53%
copy from 
docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_replace.md
copy to docs/zh-CN/sql-reference/sql-functions/string-functions/regexp/regexp.md
index bde41f7..3f59b36 100644
--- a/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_replace.md
+++ b/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp/regexp.md
@@ -1,6 +1,6 @@
 ---
 {
-    "title": "regexp_replace",
+    "title": "regexp",
     "language": "zh-CN"
 }
 ---
@@ -24,31 +24,33 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-# regexp_replace
+# regexp
 ## description
-### Syntax
+### syntax
 
-`VARCHAR regexp_replace(VARCHAR str, VARCHAR pattern, VARCHAR repl)
+'BOOLEAN regexp(VARCHAR str, VARCHAR pattern)'
 
-
-对字符串 str 进行正则匹配, 将命中 pattern 的部分使用 repl 来进行替换
+对字符串 str 进行正则匹配,匹配上的则返回 true,没匹配上则返回 false。pattern 为正则表达式。
 
 ## example
 
 ```
-mysql> SELECT regexp_replace('a b c', " ", "-");
-+-----------------------------------+
-| regexp_replace('a b c', ' ', '-') |
-+-----------------------------------+
-| a-b-c                             |
-+-----------------------------------+
-
-mysql> SELECT regexp_replace('a b c','(b)','<\\1>');
-+----------------------------------------+
-| regexp_replace('a b c', '(b)', '<\1>') |
-+----------------------------------------+
-| a <b> c                                |
-+----------------------------------------+
+// 查找 k1 字段中以 'billie' 为开头的所有数据
+mysql > select k1 from test where k1 regexp '^billie';
++--------------------+
+| k1                 |
++--------------------+
+| billie eillish     |
++--------------------+
+
+// 查找 k1 字段中以 'ok' 为结尾的所有数据:
+mysql > select k1 from test where k1 regexp 'ok$';
++----------+
+| k1       |
++----------+
+| It's ok  |
++----------+
 ```
+
 ## keyword
-REGEXP_REPLACE,REGEXP,REPLACE
+REGEXP
diff --git 
a/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_extract.md 
b/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp/regexp_extract.md
similarity index 99%
rename from 
docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_extract.md
rename to 
docs/zh-CN/sql-reference/sql-functions/string-functions/regexp/regexp_extract.md
index a372f13..737721a 100644
--- a/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_extract.md
+++ 
b/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp/regexp_extract.md
@@ -13,9 +13,7 @@ regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at
-
   http://www.apache.org/licenses/LICENSE-2.0
-
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -42,7 +40,6 @@ mysql> SELECT regexp_extract('AbCdE', 
'([[:lower:]]+)C([[:lower:]]+)', 1);
 +-------------------------------------------------------------+
 | b                                                           |
 +-------------------------------------------------------------+
-
 mysql> SELECT regexp_extract('AbCdE', '([[:lower:]]+)C([[:lower:]]+)', 2);
 +-------------------------------------------------------------+
 | regexp_extract('AbCdE', '([[:lower:]]+)C([[:lower:]]+)', 2) |
diff --git 
a/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_replace.md 
b/docs/zh-CN/sql-reference/sql-functions/string-functions/regexp/regexp_replace.md
similarity index 100%
rename from 
docs/zh-CN/sql-reference/sql-functions/string-functions/regexp_replace.md
rename to 
docs/zh-CN/sql-reference/sql-functions/string-functions/regexp/regexp_replace.md

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to