Skip to content

Commit

Permalink
Merge pull request #203 from ymyzk/update-return-value-from-re
Browse files Browse the repository at this point in the history
re.search の戻り値を Python 3.7 以降の型に修正
  • Loading branch information
takanory committed May 28, 2023
2 parents b714018 + 60ef158 commit 4d83784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/textbook/5_module.md
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ Python自体も標準でモジュールを提供しています。これら標
>>> import re
>>> m = re.search('(P(yth|l)|Z)o[pn]e?', 'Python')
>>> m
<_sre.SRE_Match object; span=(0, 6), match='Python'>
<re.Match object; span=(0, 6), match='Python'>
```

正規表現にマッチした場合、 `re.search()` は結果を表すマッチオブジェクトを返します。
Expand Down

0 comments on commit 4d83784

Please sign in to comment.