sindresorhus/semver-regex — pull request #5 by vkbansal (2014-12-05 12:23:40+00:00)
Title: added toString method

This patch overrides the `toString()` method which returns the raw regex.

### Use Case

Suppose one has several files in my project with the following header
```
/**
* @version 0.5.x
*/
```
I can write a task/script to bump the `@version` tag in header of all files using `toString()` method

```js
var semverRegex = require('semver-regex');
var vesionRegex = new RegExp("(\s?\*\s+?@version\s+?)(" + semverRegex + ")");

something.replace(versionRegex, "$1 0.6.0");
```

This patch is 100% backward compatible. All the tests pass.