```python
>>> re.match(r'^microtasks/province/(?P<province>\d+)?/?$', 'microtasks/province/').groups()
(None,)
>>> re.match(r'^microtasks/province/(?P<province>\d+)?/?$', 'microtasks/province/12/').groups()
('12',)
>>> 
```