All this splitting, replacing and validation needs documentation. In comments I'd like to see:

* What is the expected format before doing the string manipulations and regex?
* What is the expected format after it's been done, with an example or two
* What is the expected value that we validate?
* What is a LIST?
* What is a RANGE?

Should probably split the literals `LIST` and `RANGE` into constants as well rather than hardcoded strings.