PgExtractString » 历史记录 » 版本 3
yangdefeng, 2022-05-24 08:44
1 | 3 | yangdefeng | h4. _*%{color:green}pgExtractString%*_ |
---|---|---|---|
2 | |||
3 | 2 | machenhe | 用分割符分割字符串 |
4 | 1 | machenhe | |
5 | |||
6 | 2 | machenhe | 标签:命令定义|pgExtractString |
7 | 1 | machenhe | |
8 | *格式* |
||
9 | 2 | machenhe | |命令名 |参数1 |参数2 |参数3 |参数4 | |
10 | |pgExtractString |分割符 |待分割字符串 |分割结果值 |分割数量 | |
||
11 | 1 | machenhe | |
12 | 2 | machenhe | *说明* |
13 | 3 | yangdefeng | * 参数1: 分割使用的字符 |
14 | 1 | machenhe | 比如"|" "_" |
15 | |||
16 | 3 | yangdefeng | * 参数2: 包含分割符的待分割字符串 |
17 | 2 | machenhe | "aaa|bbb|ccc" |
18 | 1 | machenhe | "aaa_bbb_ccc" |
19 | 2 | machenhe | |
20 | 3 | yangdefeng | * 参数3: 分割结果值 |
21 | 2 | machenhe | ** 取值方式1 |
22 | 使用自定义s变量,在自定义s变量后加_X(X=1,2,3...) |
||
23 | 1 | machenhe | %{color:lightGrey}pgExtractString | s0 s$拆分值 n0 |
24 | 2 | machenhe | sendMsg 6 拆分后第3个值是<$str(s$拆分值_3)>% |
25 | ** 取值方式2 |
||
26 | 1 | machenhe | 使用命令[[getListValue]]取值 |
27 | 2 | machenhe | %{color:lightGrey}pgextractString | s0 s$拆分值 n0 |
28 | getListValue s$拆分值 1 s$返回结果 |
||
29 | 1 | machenhe | sendMsg 6 拆分后第1个值是:<$str(s$返回结果)>% |
30 | 3 | yangdefeng | * 参数4: 分割数量 |
31 | 1 | machenhe | |
32 | - |
||
33 | - |
||
34 | |||
35 | 3 | yangdefeng | h4. *%{color:deepskyblue}特戒引擎脚本示例:%* |
36 | 1 | machenhe | |
37 | bq. [@main] |
||
38 | #act |
||
39 | 3 | yangdefeng | [[mov]] s0 特戒|版本39|发布日期20220305 |
40 | *{color:green}pgExtractString* | s0 s$拆分值 n0 |
||
41 | [[sendMsg]] 6 拆分后第3个值是<$str(s$拆分值_3)> |
||
42 | 2 | machenhe | sendMsg 6 <$str(n0)> |
43 | |||
44 | - |
||
45 | - |
||
46 | |||
47 | bq. [@main] |
||
48 | #act |
||
49 | 3 | yangdefeng | [[mov]] s0 特戒|版本39|发布日期20220305 |
50 | *{color:green}pgextractString* | s0 s$拆分值 n0 |
||
51 | [[getListValue]] s$拆分值 1 s$返回结果 |
||
52 | [[sendMsg]] 6 拆分后第1个值是:<$str(s$返回结果)> |
||
53 | 2 | machenhe | sendMsg 6 <$str(n0)> |