```python
import re
str_tag
= '<button>text<img src="image.png">text02</button>'
# 正規表現パターン
pattern = r'>([^<]+)<'
# テキスト部分を抽出
matches = re.findall(pattern, str_tag)
print(matches) # ['text', 'text02']
```python
import re
str_tag
= '<button>text<img src="image.png">text02</button>'
# 正規表現パターン
pattern = r'>([^<]+)<'
# テキスト部分を抽出
matches = re.findall(pattern, str_tag)
print(matches) # ['text', 'text02']
コメント
コメントを投稿