```ruby
... if lang.match(/[\.@]/)
```

looks more readable, but in this case it could be even changed to something like

```ruby
... if lang.include?(".") || lang.include?("@")
```

or

```ruby
... if lang.count(".@") > 0
```

See http://ruby-doc.org/core-2.0.0/String.html