And those of your women as have passed the age of monthly courses, for them the 'Iddah (prescribed period), if you have doubts (about their periods), is three months, and for those who have no courses [(i.e. they are still immature) their 'Iddah (prescribed period) is three months likewise, except in case of death]. And for those who are pregnant (whether they are divorced or their husbands are dead), their 'Iddah (prescribed period) is until they deliver (their burdens), and whosoever fears Allah and keeps his duty to Him, He will make his matter easy for him.
What the verse says is different
from what the translation says:
...and the waiting period for those who have had no monthly course is three lunar months likewise.
It is clear that the 3-lunar month (shahr) waiting period is for the two parties
to decide whether they shall divorce or not
rather than to find out whether the wife is pregnant or not.
They already know she is not pregnant,
the waiting period would NOT be measured by lunar months,
it would be measured by monthly courses like in 2:228.
This part of the verse is about delayed puberty
which is pathologically considered the case if the menarche has failed to occur by the age of 18
The lady marries AND divorces
before her first monthly course.