```python
re.match('A(.*?)(B)?', 'A B').groups()
```
```python
('', None)
```

Why `.*?` behave greedily in comparison with `(B)?` and how can I avoid that?
Apr 1, 11:19pm
Empty message
Apr 1, 11:19pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.