Skip to content

Commit 27febfe

Browse files
authored
Update 06 - 正则表达式 提取数据.md
缩进有误
1 parent 413fd5e commit 27febfe

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

06 - 正则表达式 提取数据.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -259,19 +259,19 @@ import re
259259

260260
match_obj = re.match("hello\Sworld", "hello&world")
261261
if match_obj:
262-
result = match_obj.group()
263-
print(result)
262+
result = match_obj.group()
263+
print(result)
264264
else:
265-
print("匹配失败")
265+
print("匹配失败")
266266

267267

268268

269269
match_obj = re.match("hello\Sworld", "hello$world")
270270
if match_obj:
271-
result = match_obj.group()
272-
print(result)
271+
result = match_obj.group()
272+
print(result)
273273
else:
274-
print("匹配失败")
274+
print("匹配失败")
275275
```
276276

277277
运行结果:
@@ -740,4 +740,4 @@ pattern = re.compile(r'<input type="submit" id="(.*?)" value="(.*?)" class="bg s
740740

741741
result = pattern.findall(string)
742742
print(result)
743-
```
743+
```

0 commit comments

Comments
 (0)