Thank you for this info.
If you want, you can do this in one line
Would be DRYer to use a Map instead of defining 3 helper functions
This comment is hidden because it contains spoiler information about the solution
Beware! You should not convert unknown strings to atoms. Atoms are not garbage collected, so you could end with a memory leak or a security vulnerability
FYI - You can split using a regex rather than doing a replace + split.