回答編集履歴
2
re.MULTILINE は不要なので削除
answer
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
xyz'''
|
8
8
|
test_str2 = "Content-Transfer-Encoding: base64 xyz"
|
9
9
|
|
10
|
-
test_re = re.compile(r'base64.*', flags=
|
10
|
+
test_re = re.compile(r'base64.*', flags=re.DOTALL)
|
11
11
|
|
12
12
|
#get base64
|
13
13
|
print(test_re.search(test_str))
|
1
説明追加
answer
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
公式ドキュメントより
|
2
|
+
https://docs.python.org/ja/3.6/howto/regex.html#compilation-flags
|
3
|
+
|
1
4
|
```python
|
2
5
|
import re
|
3
6
|
test_str = '''Content-Transfer-Encoding: base64
|