We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 413fd5e commit 27febfeCopy full SHA for 27febfe
06 - 正则表达式 提取数据.md
@@ -259,19 +259,19 @@ import re
259
260
match_obj = re.match("hello\Sworld", "hello&world")
261
if match_obj:
262
-result = match_obj.group()
263
-print(result)
+ result = match_obj.group()
+ print(result)
264
else:
265
-print("匹配失败")
+ print("匹配失败")
266
267
268
269
match_obj = re.match("hello\Sworld", "hello$world")
270
271
272
273
274
275
```
276
277
运行结果:
@@ -740,4 +740,4 @@ pattern = re.compile(r'<input type="submit" id="(.*?)" value="(.*?)" class="bg s
740
741
result = pattern.findall(string)
742
print(result)
743
-```
+```
0 commit comments