This can be restructured a bit to make it a bit simpler:

```ruby
output.scan(/dhcp_server_identifier.*(\d+\.\d+\.\d+\.\d+)/).first
```