How about:

```ruby
user_id_pattern = %r{https://services\.yesmail\.com/enterprise/subscribers/(\d+)}
api_get[user_id_pattern].to_i
```