You could use `detect` here:

```ruby
extension = self.class.extensions.detect do |regexp, _block|
  regexp.match(item)
end

if extension
  pattern = extension.last
  results.update(extract_annotations_from(item, pattern))
end
```