I think a Regex might be the safer bet here. E.g. /\d+/ or /\d+[px]/ something like that. E.g. the above also works for "Hell0"