Skip to content

Commit

Permalink
Simplify a regex
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Jul 24, 2017
1 parent 3e469d2 commit f283341
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
Expand Up @@ -130,7 +130,7 @@ exports.parse = function (str, opts) {
return ret;
}

str = str.trim().replace(/^(\?|#|&)/, '');
str = str.trim().replace(/^[?#&]/, '');

if (!str) {
return ret;
Expand Down

0 comments on commit f283341

Please sign in to comment.