Why not just explode(':', $expression) && count() == 2 ?