Skip to content

Commit 7abe977

Browse files
committed
match.start, match.end, match.groups() 删除
1 parent 262db1d commit 7abe977

File tree

6 files changed

+4
-106
lines changed

6 files changed

+4
-106
lines changed

en-us/api/QuecPythonClasslib.md

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7783,55 +7783,6 @@ It matches the string of the entire expression.
77837783
* It returns the string of the matched entire expression.
77847784

77857785

7786-
7787-
##### Match Multiple Strings
7788-
7789-
>**match.groups()**
7790-
7791-
It matches the string of the entire expression.
7792-
7793-
- Parameter
7794-
7795-
* None
7796-
7797-
* Return Value
7798-
7799-
* It returns a tuple containing all substrings of the matching group.
7800-
7801-
7802-
7803-
##### Get Start Index
7804-
7805-
>**match.start(index)**
7806-
7807-
It returns the index of the starting original string of the matched substring group.
7808-
7809-
- Parameter
7810-
7811-
| Parameter | Type | Description |
7812-
| --------- | ---- | ------------------------------------------------------------ |
7813-
| index | int | Index defaults to the entire group, otherwise a group is selected. |
7814-
7815-
* Return Value
7816-
7817-
* It returns the index of the starting original string of the matched substring group.
7818-
7819-
##### Get End Index
7820-
7821-
>**match.end(index)**
7822-
7823-
It returns the index of the ending original string of the matched substring group.
7824-
7825-
- Parameter
7826-
7827-
| Parameter | Type | Description |
7828-
| --------- | ---- | ------------------------------------------------------------ |
7829-
| index | int | Index defaults to the entire group, otherwise a group is selected. |
7830-
7831-
* Return Value
7832-
7833-
* It returns the index of the ending original string of the matched substring group.
7834-
78357786
##### Example
78367787

78377788
```python

en-us/api/QuecPythonThirdlib.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ Returns the folder path where files and folders are located
18511851
```python
18521852
import ql_fs
18531853
ret = ql_fs.path_dirname("/usr/bin")
1854-
print("ret")
1854+
print(ret)
18551855

18561856
#The printing results are as follows
18571857
# /usr

en-us/api/pythonStdlib.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1893,7 +1893,7 @@ Measure ticks difference between values returned from [`ticks_ms()`](https://doc
18931893
import utime
18941894
start = utime.ticks_us()
18951895
while pin.value() == 0:
1896-
if utime.ticks_diff(time.ticks_us(), start) > 500:
1896+
if utime.ticks_diff(utime.ticks_us(), start) > 500:
18971897
raise TimeoutError
18981898
```
18991899

zh-cn/api/QuecPythonClasslib.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -8246,59 +8246,6 @@ ure.search 扫描整个字符串并返回第一个成功的匹配。
82468246
返回匹配的整个表达式的字符串
82478247

82488248

8249-
8250-
##### 匹配多个字符串
8251-
8252-
>**match.groups()**
8253-
8254-
匹配的整个表达式的字符串
8255-
8256-
- 参数
8257-
8258-
8259-
8260-
* 返回值
8261-
8262-
返回一个包含该匹配组的所有子字符串的元组。
8263-
8264-
8265-
8266-
##### 获取起始索引
8267-
8268-
>**match.start(index)**
8269-
8270-
返回匹配的子字符串组的起始原始字符串中的索引。
8271-
8272-
- 参数
8273-
8274-
| 参数 | 类型 | 说明 |
8275-
| :---- | :--- | ------------------------------------ |
8276-
| index | int | index 默认为整个组,否则将选择一个组 |
8277-
8278-
* 返回值
8279-
8280-
返回匹配的子字符串组的起始原始字符串中的索引。
8281-
8282-
8283-
8284-
##### 获取结束索引
8285-
8286-
>**match.end(index)**
8287-
8288-
返回匹配的子字符串组的结束原始字符串中的索引。
8289-
8290-
- 参数
8291-
8292-
| 参数 | 类型 | 说明 |
8293-
| :---- | :--- | ------------------------------------ |
8294-
| index | int | index 默认为整个组,否则将选择一个组 |
8295-
8296-
* 返回值
8297-
8298-
返回匹配的子字符串组的结束原始字符串中的索引。
8299-
8300-
8301-
83028249
##### 使用示例
83038250

83048251
```python

zh-cn/api/QuecPythonThirdlib.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1880,7 +1880,7 @@ print(ret)
18801880
```python
18811881
import ql_fs
18821882
ret = ql_fs.path_dirname("/usr/bin")
1883-
print("ret")
1883+
print(ret)
18841884

18851885
# 打印结果如下
18861886
# /usr

zh-cn/api/pythonStdlib.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,7 @@ utime 模块用于获取当前时间和日期、测量时间间隔和延迟。
19201920
import utime
19211921
start = utime.ticks_us()
19221922
while pin.value() == 0:
1923-
if utime.ticks_diff(time.ticks_us(), start) > 500:
1923+
if utime.ticks_diff(utime.ticks_us(), start) > 500:
19241924
raise TimeoutError
19251925
```
19261926

0 commit comments

Comments
 (0)