Each you are opening a parenthesis in a regexp, its content will be captured in order to let you use it later. You can read more about it [here](http://www.regular-expressions.info/brackets.html).

It is usually a good practice to disable those capturing parenthesis when you need them, this way you can reduce their cost (in terms of computing power).

In this specific case, the following regex will exactly has the same effect:
```javascript
/(?:(?:http|https):\/\/|www\.)\S+/i.test(url)
```