Best Regular Expression for a one or two values optionally divided by a certain character
This is a somewhat difficult one because regular expressions inherently lack memory, so you can't tell on the back whether the front existed, so I don't think one can get better than the one you wrote for that particular set.  If you wanted to allow some sort of variant, you could potentially find a better one.