Skip to content

Commit

Permalink
Use \d for any digit instead of 0-9 to capture semantic meaning. (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
dilijev authored and sindresorhus committed Jun 24, 2016
1 parent 3a4ca12 commit 624a91e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'use strict';
module.exports = function () {
return /\bv?(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)\.(?:0|[1-9][0-9]*)(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?\b/ig;
return /\bv?(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[\da-z\-]+(?:\.[\da-z\-]+)*)?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?\b/ig;
};

0 comments on commit 624a91e

Please sign in to comment.