Is this the logic?

```python
r"->" in line and ("1234567890" in line or re.search(r"^\s*\d+\s$", line))
```