Handle empty path specification (#3538)
- Makes clear that an empty path specification (`{}`) is an error, with test (note `+` -> `*` change in regex)
- Switch regex to named capture groups to reduce arbitrary-looking indices in the code
cc @chloetedder