You only provoke attacks of opportunity if you leave the range of a creature's melee attack.
A swarm moving into a creature's space does not provoke an attack from that creature, though it may provoke an attack from other creatures if the swarm is leaving their range. If the swarm is in the creature's space and the creature moves away, that will provoke an attack as the swarm's range is 0ft.
During combat if a swarm moves to occupy a creatures space does that provoke an opportunity of attack against the swarm?
You only provoke attacks of opportunity if you leave the range of a creature's melee attack.
A swarm moving into a creature's space does not provoke an attack from that creature, though it may provoke an attack from other creatures if the swarm is leaving their range. If the swarm is in the creature's space and the creature moves away, that will provoke an attack as the swarm's range is 0ft.
Technically, 0 ft is within your range of attack, so no.