This more simple regex will have a similar effect:
```javascript
if (!/https?:\/\/\S+\.\S+/i.test(url) {
```