質問編集履歴

6

文法の修正

2019/08/28 05:08

投稿

daichanman
daichanman

スコア6

test CHANGED
File without changes
test CHANGED
@@ -38,7 +38,7 @@
38
38
 
39
39
 
40
40
 
41
- course = re.search(r"([コース])(.|\s)*?(税抜)", msg)
41
+ course = re.search(r"([コース])(.*\n)*?(税抜)", msg)
42
42
 
43
43
  if course is not None:
44
44
 

5

文法の修正

2019/08/28 05:08

投稿

daichanman
daichanman

スコア6

test CHANGED
File without changes
test CHANGED
File without changes

4

文法の修正

2019/08/28 04:52

投稿

daichanman
daichanman

スコア6

test CHANGED
File without changes
test CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  name = re.search(r"[予約者](.+)\s(.+)\s(()(.+)\s(.+)())([^様]+)", msg, re.MULTILINE)
22
22
 
23
- if not name is None:
23
+ if name is not None:
24
24
 
25
25
  logging.info(name.group(1))
26
26
 
@@ -40,7 +40,7 @@
40
40
 
41
41
  course = re.search(r"([コース])(.|\s)*?(税抜)", msg)
42
42
 
43
- if not course is None:
43
+ if course is not None:
44
44
 
45
45
  logging.info(course.group(2))
46
46
 

3

文法の修正

2019/08/28 02:33

投稿

daichanman
daichanman

スコア6

test CHANGED
File without changes
test CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  name = re.search(r"[予約者](.+)\s(.+)\s(()(.+)\s(.+)())([^様]+)", msg, re.MULTILINE)
22
22
 
23
- if name is None:
23
+ if not name is None:
24
24
 
25
25
  logging.info(name.group(1))
26
26
 
@@ -36,11 +36,13 @@
36
36
 
37
37
  ```python
38
38
 
39
- cose = re.search(r"([コース])(.|\s)*?(税抜)", msg)
40
39
 
41
- if cose is None:
42
40
 
41
+ course = re.search(r"([コース])(.|\s)*?(税抜)", msg)
42
+
43
+ if not course is None:
44
+
43
- logging.info(cose.group(2))
45
+ logging.info(course.group(2))
44
46
 
45
47
  ```
46
48
 

2

インデント修正

2019/08/28 02:28

投稿

daichanman
daichanman

スコア6

test CHANGED
File without changes
test CHANGED
@@ -20,15 +20,15 @@
20
20
 
21
21
  name = re.search(r"[予約者](.+)\s(.+)\s(()(.+)\s(.+)())([^様]+)", msg, re.MULTILINE)
22
22
 
23
- if name is None:
23
+ if name is None:
24
24
 
25
- logging.info(name.group(1))
25
+ logging.info(name.group(1))
26
26
 
27
- logging.info(name.group(2))
27
+ logging.info(name.group(2))
28
28
 
29
- logging.info(name.group(4))
29
+ logging.info(name.group(4))
30
30
 
31
- logging.info(name.group(5))
31
+ logging.info(name.group(5))
32
32
 
33
33
  ```
34
34
 
@@ -38,9 +38,9 @@
38
38
 
39
39
  cose = re.search(r"([コース])(.|\s)*?(税抜)", msg)
40
40
 
41
- if cose is None:
41
+ if cose is None:
42
42
 
43
- logging.info(cose.group(2))
43
+ logging.info(cose.group(2))
44
44
 
45
45
  ```
46
46
 

1

誤字

2019/08/28 02:11

投稿

daichanman
daichanman

スコア6

test CHANGED
File without changes
test CHANGED
@@ -20,7 +20,7 @@
20
20
 
21
21
  name = re.search(r"[予約者](.+)\s(.+)\s(()(.+)\s(.+)())([^様]+)", msg, re.MULTILINE)
22
22
 
23
- if name != None:
23
+ if name is None:
24
24
 
25
25
  logging.info(name.group(1))
26
26
 
@@ -38,7 +38,7 @@
38
38
 
39
39
  cose = re.search(r"([コース])(.|\s)*?(税抜)", msg)
40
40
 
41
- if cose != None:
41
+ if cose is None:
42
42
 
43
43
  logging.info(cose.group(2))
44
44