This should be okay. The `\w` matches digits too. (And underscores. I don't recall what else.)

```js
> '--es5'.match(/^--([\w\-]+)(?:=(.*))?$/)
[ '--es5',
  'es5',
  undefined,
  index: 0,
  input: '--es5' ]
```