We may use
```js
device.osVersion = (that.test(/android\s(\d+)\./) ? RegExp.$1 : '');
```
instead of
```js
device.osVersion = (that.test(/android ([^\s]+)/) ? RegExp.$1.replace(';', '') : '');
```