Skip to content

Commit

Permalink
Update 7.string.md (#1120)
Browse files Browse the repository at this point in the history
  • Loading branch information
randomJoe211 authored Nov 1, 2021
1 parent e6f9c73 commit aefcb11
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions docs-2.0/3.ngql-guide/5.operators/7.string.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ Nebula Graph支持使用字符串运算符进行连接、搜索、匹配运算

```ngql
nebula> RETURN 'a' + 'b';
+-------+
| (a+b) |
+-------+
| "ab" |
+-------+
+-----------+
| ("a"+"b") |
+-----------+
| "ab" |
+-----------+
nebula> UNWIND 'a' AS a UNWIND 'b' AS b RETURN a + b;
+-------+
| (a+b) |
Expand Down Expand Up @@ -68,7 +68,7 @@ nebula> GO FROM "player101" OVER serve WHERE !(properties($$).name CONTAINS "ets
### `(NOT) IN`

```ngql
nebula> RETURN 1 IN [1,2,3], "Yao" NOT IN ["Yi", "Tim", "Kobe"], NULL IN ["Yi", "Tim", "Kobe"]
nebula> RETURN 1 IN [1,2,3], "Yao" NOT IN ["Yi", "Tim", "Kobe"], NULL IN ["Yi", "Tim", "Kobe"];
+----------------+------------------------------------+-------------------------------+
| (1 IN [1,2,3]) | ("Yao" NOT IN ["Yi","Tim","Kobe"]) | (NULL IN ["Yi","Tim","Kobe"]) |
+----------------+------------------------------------+-------------------------------+
Expand All @@ -79,14 +79,14 @@ nebula> RETURN 1 IN [1,2,3], "Yao" NOT IN ["Yi", "Tim", "Kobe"], NULL IN ["Yi",
### `(NOT) STARTS WITH`

```ngql
nebula> RETURN 'apple' STARTS WITH 'app', 'apple' STARTS WITH 'a', 'apple' STARTS WITH toUpper('a')
nebula> RETURN 'apple' STARTS WITH 'app', 'apple' STARTS WITH 'a', 'apple' STARTS WITH toUpper('a');
+-----------------------------+---------------------------+------------------------------------+
| ("apple" STARTS WITH "app") | ("apple" STARTS WITH "a") | ("apple" STARTS WITH toUpper("a")) |
+-----------------------------+---------------------------+------------------------------------+
| true | true | false |
+-----------------------------+---------------------------+------------------------------------+
nebula> RETURN 'apple' STARTS WITH 'b','apple' NOT STARTS WITH 'app'
nebula> RETURN 'apple' STARTS WITH 'b','apple' NOT STARTS WITH 'app';
+---------------------------+---------------------------------+
| ("apple" STARTS WITH "b") | ("apple" NOT STARTS WITH "app") |
+---------------------------+---------------------------------+
Expand All @@ -97,7 +97,7 @@ nebula> RETURN 'apple' STARTS WITH 'b','apple' NOT STARTS WITH 'app'
### `(NOT) ENDS WITH`

```ngql
nebula> RETURN 'apple' ENDS WITH 'app', 'apple' ENDS WITH 'e', 'apple' ENDS WITH 'E', 'apple' ENDS WITH 'b'
nebula> RETURN 'apple' ENDS WITH 'app', 'apple' ENDS WITH 'e', 'apple' ENDS WITH 'E', 'apple' ENDS WITH 'b';
+---------------------------+-------------------------+-------------------------+-------------------------+
| ("apple" ENDS WITH "app") | ("apple" ENDS WITH "e") | ("apple" ENDS WITH "E") | ("apple" ENDS WITH "b") |
+---------------------------+-------------------------+-------------------------+-------------------------+
Expand All @@ -115,11 +115,11 @@ Nebula Graph支持使用正则表达式进行过滤,正则表达式的语法

```ngql
nebula> RETURN "384748.39" =~ "\\d+(\\.\\d{2})?";
+----------------------------+
| (384748.39=~\d+(\.\d{2})?) |
+----------------------------+
| true |
+----------------------------+
+--------------------------------+
| ("384748.39"=~"\d+(\.\d{2})?") |
+--------------------------------+
| true |
+--------------------------------+
nebula> MATCH (v:player) WHERE v.name =~ 'Tony.*' RETURN v.name;
+---------------+
Expand Down

0 comments on commit aefcb11

Please sign in to comment.