回答編集履歴

1

より必要とされている処理に近づける

2021/02/15 01:32

投稿

phoepsilonix
phoepsilonix

スコア233

test CHANGED
@@ -18,7 +18,7 @@
18
18
 
19
19
 
20
20
 
21
- result = re.sub(r'^(.*)(\n)(.*)$', r'\1\3', text)
21
+ result = re.sub(r'^(【テスト】)(.*)(\n)(.*)$', r'\1\2\4', text)
22
22
 
23
23
  print(result)
24
24