Fix #222

`-?` means optional hyphen, also used in number regexes. `(?:...)` means group without capture, used many places.
Ok, this is better, but it's somewhat inefficient as a regex, since non-hyphen characters can match multiple ways, causing some backtracking at regex-matching-time.  Think about it this way: the rule we want to enforce for hyphens is that they not be the last character, right?  So the last hyphen must be followed by some other character; all preceding hyphens can be followed by anything, including more hyphens.  This leads to thinking of the following chunk: `-+[_a-zA-Z0-9]+`, which describes a sequence of one or more hyphens followed by at least one non-hyphen character.  This chunk can be repeated as many times as we want, and describes all the ways hyphens can be validly part of a name.  We just need to combine that with the valid prefixes of a name, meaning all the letters that can precede the first hyphen.  Putting that all together leads to the better regex: `"^[_a-zA-Z][_a-zA-Z0-9]*(?:-+[_a-zA-Z0-9]+)*"`