Using the `=~` operator affects global states and sets the the global match variables. While it's unlikely that this could be an issue, this isn't thread safe. It would be preferable to do `String#match` and use the returned match data variable.

```ruby
if (match = str.match(/regex goes here/))
  ip_addr_string = match[1]
end
```