Edit:
^/api(/(?!v[0-9]).)?$ is v1
^/api/v2(/.)?$ is v2
It's really not an issue in any case, it just itches your brain, because is not as neat as you would like it to be.