parse character range