Enhanced string parsing for number range